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(); }
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(); }
private void Process(Event.Disconnected disconnection) { if (_entity != null) { _entity.Cleanup(); _eventMediator.Publish(new Event.Deregister(_entity)); _entity = null; } }
private void Process(Event.Disconnected disconnection) { if (_entity != null) { _entity.Cleanup(); _eventMediator.Publish(new Event.Deregister(_entity)); _entity = null; } }
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()); }