private async Task LoadIoTDevicesAsync() { _iotHubDeviceGateways = (await Task.Run(() => _devicesProcessor.GetDevices())).ToDictionary(i => i.Id, i => { var gw = new DeviceGateway(); gw.Connect(i.ConnectionString); return(gw); }); }
public async Task GetDeviceById() { var settings = TestHelper.GetSettings(); var client = new FibaroClient(settings); var gw = new DeviceGateway(client); var entities = await gw.GetDeviceById(1); Assert.NotNull(entities); }
public DeviceController(DeviceGateway deviceGateway, IHubContext <VueHub> hubContext) { _deviceGateway = deviceGateway; _hubContext = hubContext; }