コード例 #1
0
ファイル: MainWindowViewModel.cs プロジェクト: Ankitvaibs/SM
 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);
     });
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public DeviceController(DeviceGateway deviceGateway, IHubContext <VueHub> hubContext)
 {
     _deviceGateway = deviceGateway;
     _hubContext    = hubContext;
 }