Created
August 8, 2012 06:56
-
-
Save Tapanila/3292930 to your computer and use it in GitHub Desktop.
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
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