Example #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._OptionButtonInOptionEvents_SinkHelper.Id, Events.DispOptionButtonEvents_SinkHelper.Id);
            }


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

            if (Events.DispOptionButtonEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase))
            {
                _dispOptionButtonEvents_SinkHelper = new Events.DispOptionButtonEvents_SinkHelper(this, _connectPoint);
                return;
            }
        }
Example #2
0
        public void DisposeEventBridge()
        {
            if (null != __OptionButtonInOptionEvents_SinkHelper)
            {
                __OptionButtonInOptionEvents_SinkHelper.Dispose();
                __OptionButtonInOptionEvents_SinkHelper = null;
            }
            if (null != _dispOptionButtonEvents_SinkHelper)
            {
                _dispOptionButtonEvents_SinkHelper.Dispose();
                _dispOptionButtonEvents_SinkHelper = null;
            }

            _connectPoint = null;
        }