public void Close() { EnsureNotClosed(); foreach (var sink in Sinks) { if (sink is IDisposable disposable) { disposable.Dispose(); } sink.Active = false; } Sinks.Clear(); Decorators.Clear(); HasBeenClosed = true; }