Пример #1
0
        public void CreateEventBridge()
        {
            if (false == Factory.Settings.EnableEvents)
            {
                return;
            }

            if (null != _connectPoint)
            {
                return;
            }

            if (null == _activeSinkId)
            {
                _activeSinkId = SinkHelper.GetConnectionPoint(this, ref _connectPoint, Events._PageHdrFtrInReportEvents_SinkHelper.Id, Events.DispPageHdrFtrInReportEvents_SinkHelper.Id);
            }


            if (Events._PageHdrFtrInReportEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase))
            {
                __PageHdrFtrInReportEvents_SinkHelper = new Events._PageHdrFtrInReportEvents_SinkHelper(this, _connectPoint);
                return;
            }

            if (Events.DispPageHdrFtrInReportEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase))
            {
                _dispPageHdrFtrInReportEvents_SinkHelper = new Events.DispPageHdrFtrInReportEvents_SinkHelper(this, _connectPoint);
                return;
            }
        }
Пример #2
0
        public void DisposeEventBridge()
        {
            if (null != __PageHdrFtrInReportEvents_SinkHelper)
            {
                __PageHdrFtrInReportEvents_SinkHelper.Dispose();
                __PageHdrFtrInReportEvents_SinkHelper = null;
            }
            if (null != _dispPageHdrFtrInReportEvents_SinkHelper)
            {
                _dispPageHdrFtrInReportEvents_SinkHelper.Dispose();
                _dispPageHdrFtrInReportEvents_SinkHelper = null;
            }

            _connectPoint = null;
        }