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._ListBoxEvents_SinkHelper.Id, Events.DispListBoxEvents_SinkHelper.Id);
            }


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

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

			_connectPoint = null;
		}