Skip to content

Instantly share code, notes, and snippets.

@KyleGobel
Created November 22, 2013 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save KyleGobel/7593793 to your computer and use it in GitHub Desktop.
Save KyleGobel/7593793 to your computer and use it in GitHub Desktop.
Use RestSharp with ReactiveExtensions and Reactive UI
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