Esempio n. 1
0
        public void DisposeEventBridge()
        {
            if (null != _applicationEvents2_SinkHelper)
            {
                _applicationEvents2_SinkHelper.Dispose();
                _applicationEvents2_SinkHelper = null;
            }
            if (null != _applicationEvents3_SinkHelper)
            {
                _applicationEvents3_SinkHelper.Dispose();
                _applicationEvents3_SinkHelper = null;
            }
            if (null != _applicationEvents4_SinkHelper)
            {
                _applicationEvents4_SinkHelper.Dispose();
                _applicationEvents4_SinkHelper = null;
            }

            _connectPoint = null;
        }
Esempio n. 2
0
        public void CreateEventBridge()
        {
            if (false == Factory.Settings.EnableEvents)
            {
                return;
            }

            if (null != _connectPoint)
            {
                return;
            }

            if (null == _activeSinkId)
            {
                _activeSinkId = SinkHelper.GetConnectionPoint2(this, ref _connectPoint, Events.ApplicationEvents2_SinkHelper.Id, Events.ApplicationEvents3_SinkHelper.Id, Events.ApplicationEvents4_SinkHelper.Id);
            }


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

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

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