Beispiel #1
0
        private void Process(Event.Connected connection)
        {
            _entity = _entityFactory.Create(connection.Name, connection.Remarks, connection.MacAddress, connection.Roster);

            _eventMediator.Publish(new Event.Register(_entity));

            _entity.Initialize();
        }
Beispiel #2
0
        private void Process(Event.Connected connection)
        {
            _entity = _entityFactory.Create(connection.Name, connection.Remarks, connection.MacAddress, connection.Roster);

            _eventMediator.Publish(new Event.Register(_entity));

            _entity.Initialize();
        }
Beispiel #3
0
        private void Process(Event.Disconnected disconnection)
        {
            if (_entity != null)
            {
                _entity.Cleanup();

                _eventMediator.Publish(new Event.Deregister(_entity));

                _entity = null;
            }
        }
Beispiel #4
0
        private void Process(Event.Disconnected disconnection)
        {
            if (_entity != null)
            {
                _entity.Cleanup();

                _eventMediator.Publish(new Event.Deregister(_entity));

                _entity = null;
            }
        }
Beispiel #5
0
 public IEnumerable <IGatewayObservable> CreateForEntityDeviceType(Entity.IInstance instance, string deviceType)
 {
     return(_factories.Where(factory => string.Equals(factory.DeviceType, deviceType, StringComparison.InvariantCultureIgnoreCase))
            .Select(factory => factory.ForEntity(instance))
            .ToArray());
 }