public void Dispose() { if (IsDisposed) return; IsDisposed = true; DisposeCore(); Disposed?.Invoke(this, EventArgs.Empty); }