public ManagedDataAdviseHolder() { _dataAdviseThread = new InvokeableThread("DataAdviseThread", ((System.Windows.Window)Current.Workbench.ViewObject).Dispatcher); this.Invoke("Creation of IDataAdviseHolder", () => { int res = Ole32Func.CreateDataAdviseHolder(out _dataAdviseHolder); if (!(res == ComReturnValue.S_OK)) throw new InvalidOperationException("The COM operation was not successful"); }); }
public void Dispose() { _dataAdviseThread.Dispose(); _dataAdviseThread = null; _dataAdviseHolder = null; }