예제 #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._OptionGroupEvents_SinkHelper.Id, Events.DispOptionGroupEvents_SinkHelper.Id);
            }


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

            if (Events.DispOptionGroupEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase))
            {
                _dispOptionGroupEvents_SinkHelper = new Events.DispOptionGroupEvents_SinkHelper(this, _connectPoint);
                return;
            }
        }
예제 #2
0
        public void DisposeEventBridge()
        {
            if (null != __OptionGroupEvents_SinkHelper)
            {
                __OptionGroupEvents_SinkHelper.Dispose();
                __OptionGroupEvents_SinkHelper = null;
            }
            if (null != _dispOptionGroupEvents_SinkHelper)
            {
                _dispOptionGroupEvents_SinkHelper.Dispose();
                _dispOptionGroupEvents_SinkHelper = null;
            }

            _connectPoint = null;
        }