private void Dispose(bool isDisposing) { if (!isDisposing || WasDisposed) { return; } WasDisposed = true; _collector.Dispose(); _collector = null; }