Skip to content

Instantly share code, notes, and snippets.

@Tapanila
Created August 8, 2012 06:56
Show Gist options
  • Save Tapanila/3292930 to your computer and use it in GitHub Desktop.
Save Tapanila/3292930 to your computer and use it in GitHub Desktop.
using TapanilaBlogWCF.ServiceReference1;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace TapanilaBlogWCF
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
this.Loaded += MainPage_Loaded;
}
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
UseService();
}
async void UseService()
{
//Create new instance of the service client
Service1Client client = new Service1Client();
//Use the save method and wait until it is done
await client.SaveTextAsync("Tapanila", "Links", "teemu");
//Use the retrieve method, wait until it is done and save result
var response = await client.RetrieveTextAsync("teemu", "Links");
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment