Exemplo n.º 1
0
 public IObservable <ICollection <Device> > FindDevices(DeviceQueryArguments arguments)
 {
     arguments = arguments ?? new DeviceQueryArguments();
     return(_dataService
            .FindDevices(arguments)
            .LogInfo(_logger, devices => $"found {devices.Count} devices for query {arguments}")
            .LogException(_logger));
 }
Exemplo n.º 2
0
 public Task <IHttpActionResult> GetDevices([FromUri] DeviceQueryArguments arguments)
 {
     return(_queryDispatcher
            .Dispatch(new DeviceQuery()
     {
         Request = arguments
     })
            .RemapColletion <Device, DeviceModel>()
            .ToContentResult(this));
 }
Exemplo n.º 3
0
 public IObservable <ICollection <Device> > FindDevices(DeviceQueryArguments arguments)
 {
     return(Observable.Start(() => Devices.Values).ObserveOn(_ctx));
 }