Exemplo n.º 1
0
 public ActionResult <IEnumerable <InputDeviceInfo> > ListInputDevices()
 {
     return(inputDevices.FindAll().Select(d => new InputDeviceInfo
     {
         Id = d.Id,
         Name = d.Name,
         DeviceApi = d.DeviceApi.ToString(),
         Sources = d.FindAllSources().Select(s => new InputDeviceSource {
             Id = s.Id,
             Name = s.Name,
             Type = s.Type.ToString(),
         }).ToList(),
         Targets = d.FindAllTargets().Select(t => new InputDeviceTarget {
             Id = t.Id,
             Name = t.Name,
             Type = "ForceFeedback",
         }).ToList(),
     }).ToList());
 }