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)); }
public Task <IHttpActionResult> GetDevices([FromUri] DeviceQueryArguments arguments) { return(_queryDispatcher .Dispatch(new DeviceQuery() { Request = arguments }) .RemapColletion <Device, DeviceModel>() .ToContentResult(this)); }
public IObservable <ICollection <Device> > FindDevices(DeviceQueryArguments arguments) { return(Observable.Start(() => Devices.Values).ObserveOn(_ctx)); }