Exemple #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._PageEvents_SinkHelper.Id, Events.DispPageEvents_SinkHelper.Id);
            }


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

            if (Events.DispPageEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase))
            {
                _dispPageEvents_SinkHelper = new Events.DispPageEvents_SinkHelper(this, _connectPoint);
                return;
            }
        }
Exemple #2
0
        public void DisposeEventBridge()
        {
            if (null != __PageEvents_SinkHelper)
            {
                __PageEvents_SinkHelper.Dispose();
                __PageEvents_SinkHelper = null;
            }
            if (null != _dispPageEvents_SinkHelper)
            {
                _dispPageEvents_SinkHelper.Dispose();
                _dispPageEvents_SinkHelper = null;
            }

            _connectPoint = null;
        }