private void GetAllCamerasAroundPoint() { var client = new ServiceLayerClient(); var task = client.GetNearByCamerasByLatLonAsync(GeneralLocation.Longitude, GeneralLocation.Latitude); var obs = task.ToObservable(); obs.Subscribe((x) => AddNearCameras(x == null ? new List <AssetsViewDTO>() : x.ToList())); }
private void GetAllCamerasAroundPoint() { //get values here var client = new ServiceLayerClient(); var task = client.GetNearByCamerasByLatLonAsync(Longitude, Latitude); var obs = task.ToObservable(); obs.Subscribe((x) => AddNearCameras(x == null ? new List <AssetsViewDTO>() : x.ToList())); //return new ObservableCollection<AssetsViewDTO>(); }