Beispiel #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._RectangleEvents_SinkHelper.Id, Events.DispRectangleEvents_SinkHelper.Id);
            }


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

            if (Events.DispRectangleEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase))
            {
                _dispRectangleEvents_SinkHelper = new Events.DispRectangleEvents_SinkHelper(this, _connectPoint);
                return;
            }
        }
Beispiel #2
0
        public void DisposeEventBridge()
        {
            if (null != __RectangleEvents_SinkHelper)
            {
                __RectangleEvents_SinkHelper.Dispose();
                __RectangleEvents_SinkHelper = null;
            }
            if (null != _dispRectangleEvents_SinkHelper)
            {
                _dispRectangleEvents_SinkHelper.Dispose();
                _dispRectangleEvents_SinkHelper = null;
            }

            _connectPoint = null;
        }