//Checks which of the authentication button is clicked. private async void OnAdd(object sender, EventArgs e) { var b = sender as Button; bool result = false; switch (b.Text.ToString()) { case "Google": { Provider = 0; serviceProvider = "Google"; result = await Authenticator.Authenticate(Provider); break; } case "Twitter": { Provider = 1; serviceProvider = "Twitter"; result = await Authenticator.Authenticate(Provider); break; } case "Microsoft": { Provider = 2; serviceProvider = "Microsoft"; result = await Authenticator.Authenticate(Provider); break; } case "Facebook": { Provider = 3; serviceProvider = "Facebook"; result = await Authenticator.Authenticate(Provider); break; } } if (result) { this.myList = MobileClient.GetInstance().MobileServiceClient.GetTable <myTable>(); //Get the items from the myTable from your Azure Mobile apps table at Azure DisplayList.ItemsSource = await myList.Where(myList => myList.Name == serviceProvider).ToEnumerableAsync(); } }
static MobileClient() { _mobileClient = new MobileClient(); }