Streamfab.keepstreams.generic.hook-smeagol-ther... -

public void BeforeWrite(IHookContext ctx, byte[] buffer, int offset, int count) /* … */ public void AfterWrite(IHookContext ctx, byte[] buffer, int offset, int count) /* … */

public sealed class LoggingHook : IStreamHook { public void BeforeRead(IHookContext ctx, byte[] buffer, int offset, int count) => Console.WriteLine($"[LOG] About to read StreamFab.KeepStreams.Generic.Hook-Smeagol-TheR...

private readonly Stream _inner; private readonly THook _hook; private readonly IHookContext _ctx; // … public void BeforeWrite(IHookContext ctx

// 2. The inner stream performs the real read int bytesRead = _inner.Read(buffer, offset, count); int count) =&gt

if (disposing) // Hook gets notified first – it can release its own resources _hook.Dispose(_ctx);

(The exact name you gave is truncated, so the description is written to cover the most common “Hook‑Smeagol” implementation that lives inside the StreamFab.KeepStreams.Generic namespace.) Hook‑Smeagring (often abbreviated simply as Smeagol ) is a generic, stream‑interception hook that lives in the KeepStreams library. Its primary responsibilities are: