コード例 #1
0
        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;
        }