public GetDevicesResponse Get(GetDevices request)
        {
            var result = new GetDevicesResponse() { Devices = new List<DeviceInfo>() };

            foreach (InsteonDevice device in manager.Network.Devices)
            {
                result.Devices.Add(new DeviceInfo()
                {
                    Address = device.Address.ToString(),
                    Category = device.Identity.GetDeviceCategoryName(),
                    SubCategory = device.Identity.GetSubCategoryName(),
                    Name = device.DeviceName
                });
            }

            return result;
        }
Esempio n. 2
0
 public Task <IEnumerable <Device> > ExecuteAsync(GetDevices query)
 {
     return(_deviceRepository.GetAll());
 }