/// <summary> /// Initializes the event provider. /// </summary> public virtual void Initialize() { if (!_initialized) { lock (_syncroot) { if (_initialized) { return; } _rdtConnector = new RunningDocumentTableConnectionPoint(); _rdtConnector.Advise(this); _initialized = true; } } }
/// <summary> /// Releases unmanaged and - optionally - managed resources /// </summary> /// <param name="disposing"> /// <see langword="true" /> to release both managed and unmanaged resources; /// <see langword="false" /> to release only unmanaged resources. /// </param> protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { if (_rdtConnector != null) { _rdtConnector.Unadvise(); _rdtConnector = null; } _initialized = false; } _disposed = true; }