Skip to content

Instantly share code, notes, and snippets.

@jfversluis
Created March 24, 2017 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfversluis/e07c0dd92e0ebbb17700840b6a8c88b2 to your computer and use it in GitHub Desktop.
Save jfversluis/e07c0dd92e0ebbb17700840b6a8c88b2 to your computer and use it in GitHub Desktop.
Implementation in the RestClient.cs and calling from code-behind
// RestClient.cs
public async Task<Foo> GetPost (int id)
{
return await _restClient.GetPost (id);
}
// Implementing event to retrieve post 3
private async void Handle_Clicked_Awesome_3 (object sender, System.EventArgs e)
{
var foo = await _restClient.GetPost (3);
ResultLabel.Text = $"{foo.id} - {foo.title}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment