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}"); }
public SmartHub(ILogger logger, ISmartHouseFramework framework, IStorage <DeviceWrapper> deviceWrapperStorage = null) : this(logger, new List <ISmartHouseFramework> { framework }, deviceWrapperStorage) { }