public void CreateEventBridge() { if (false == Factory.Settings.EnableEvents) { return; } if (null != _connectPoint) { return; } if (null == _activeSinkId) { _activeSinkId = SinkHelper.GetConnectionPoint(this, ref _connectPoint, Events.__ControlInReportEvents_SinkHelper.Id, Events._DispControlInReportEvents_SinkHelper.Id); } if (Events.__ControlInReportEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase)) { ___ControlInReportEvents_SinkHelper = new Events.__ControlInReportEvents_SinkHelper(this, _connectPoint); return; } if (Events._DispControlInReportEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase)) { __DispControlInReportEvents_SinkHelper = new Events._DispControlInReportEvents_SinkHelper(this, _connectPoint); return; } }
public void DisposeEventBridge() { if (null != ___ControlInReportEvents_SinkHelper) { ___ControlInReportEvents_SinkHelper.Dispose(); ___ControlInReportEvents_SinkHelper = null; } if (null != __DispControlInReportEvents_SinkHelper) { __DispControlInReportEvents_SinkHelper.Dispose(); __DispControlInReportEvents_SinkHelper = null; } _connectPoint = null; }