Exemplo n.º 1
0
        private void Initialize(ISmartHouseFramework framework)
        {
            _logger.Log($"- starting {framework.GetType().Name}");
            framework.Logged += (sender, log) => _logger.Log(log.Message);
            framework.Start();

            foreach (var device in framework.Devices)
            {
                Devices.Add(device);
                _logger.Log($"Found device: {device.DeviceId}");
            }

            _logger.Log($"- started {framework.GetType().Name}");
        }
Exemplo n.º 2
0
 public SmartHub(ILogger logger, ISmartHouseFramework framework, IStorage <DeviceWrapper> deviceWrapperStorage = null) :
     this(logger, new List <ISmartHouseFramework> {
     framework
 }, deviceWrapperStorage)
 {
 }