Example #1
0
        public void OnEnter()
        {
            _packetEndpoint = _packetEndpointFactory.CreateEndpoint();
            _subscription = _packetEndpoint.Readings.Subscribe(Publish);

            _packetEndpoint.Open();

            _eventMediator.Publish(new Gateway.Event.Started());
        }
Example #2
0
        public void OnEnter()
        {
            _packetEndpoint = _packetEndpointFactory.CreateEndpoint();
            _subscription   = _packetEndpoint.Readings.Subscribe(Publish);

            _packetEndpoint.Open();

            _eventMediator.Publish(new Gateway.Event.Started());
        }
Example #3
0
        public void OnExit()
        {
            if (_subscription != null)
            {
                _subscription.Dispose();
                _subscription = null;
            }

            if (_packetEndpoint != null)
            {
                _packetEndpoint.Close();
                _packetEndpoint.Dispose();
                _packetEndpoint = null;
            }
        }
Example #4
0
        public void OnExit()
        {
            if (_subscription != null)
            {
                _subscription.Dispose();
                _subscription = null;
            }

            if (_packetEndpoint != null)
            {
                _packetEndpoint.Close();
                _packetEndpoint.Dispose();
                _packetEndpoint = null;
            }
        }