public void Dispose() { Debug.Assert(accumulatedMessages.Length == 0, "Messages must be discarded or flushed before invoking Dispose."); if (disposalCallback != null) { disposalCallback(); } disposalCallback = null; }
public LogAccumulator(ILogWriter supersededWriter, DisposalCallback disposalCallback) { SupersededWriter = supersededWriter; this.disposalCallback = disposalCallback; }