protected virtual void Dispose(bool disposing) { if (_currentState != State.Closed && disposing) { Close(); } }