Beispiel #1
0
        public virtual void CreateEventBridge()
        {
            if (false == Factory.Settings.EnableEvents)
            {
                return;
            }

            if (null != _connectPoint)
            {
                return;
            }

            if (null == _activeSinkId)
            {
                _activeSinkId = SinkHelper.GetConnectionPoint(this, ref _connectPoint, NetOffice.AccessApi.Behind.EventContracts._OptionGroupEvents_SinkHelper.Id, NetOffice.AccessApi.Behind.EventContracts.DispOptionGroupEvents_SinkHelper.Id);
            }


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

            if (NetOffice.AccessApi.Behind.EventContracts.DispOptionGroupEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase))
            {
                _dispOptionGroupEvents_SinkHelper = new NetOffice.AccessApi.Behind.EventContracts.DispOptionGroupEvents_SinkHelper(this, _connectPoint);
                return;
            }
        }
Beispiel #2
0
        public virtual void DisposeEventBridge()
        {
            if (null != __OptionGroupEvents_SinkHelper)
            {
                __OptionGroupEvents_SinkHelper.Dispose();
                __OptionGroupEvents_SinkHelper = null;
            }
            if (null != _dispOptionGroupEvents_SinkHelper)
            {
                _dispOptionGroupEvents_SinkHelper.Dispose();
                _dispOptionGroupEvents_SinkHelper = null;
            }

            _connectPoint = null;
        }