-
-
Save mdabbagh88/62227fee46da9f5f581d to your computer and use it in GitHub Desktop.
Use RestSharp with ReactiveExtensions and Reactive UI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private IObservable<List<Client>> GetClients() | |
{ | |
var request = new RestRequest("client/", Method.GET); | |
var subject = new AsyncSubject<List<Client>>(); | |
_restClient.ExecuteAsync<ClientResponseDTO>(request, response => | |
{ | |
subject.OnNext(response.Data.Entities); | |
subject.OnCompleted(); | |
}); | |
return subject; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment