diff --git a/demo/GraphTutorial/CalendarPage.xaml.cs b/demo/GraphTutorial/CalendarPage.xaml.cs index 0e74b01..24a95a1 100644 --- a/demo/GraphTutorial/CalendarPage.xaml.cs +++ b/demo/GraphTutorial/CalendarPage.xaml.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. using Microsoft.Graph; -using Microsoft.Toolkit.Graph.Providers; +using CommunityToolkit.Authentication; +using CommunityToolkit.Graph.Extensions; using Microsoft.Toolkit.Uwp.UI.Controls; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; @@ -48,7 +48,7 @@ private void ShowNotification(string message) protected override async void OnNavigatedTo(NavigationEventArgs e) { // Get the Graph client from the provider - var graphClient = ProviderManager.Instance.GlobalProvider.Graph; + var graphClient = ProviderManager.Instance.GlobalProvider.GetClient(); try { diff --git a/demo/GraphTutorial/GraphTutorial.csproj b/demo/GraphTutorial/GraphTutorial.csproj index bc8279f..e459b40 100644 --- a/demo/GraphTutorial/GraphTutorial.csproj +++ b/demo/GraphTutorial/GraphTutorial.csproj @@ -172,14 +172,23 @@ + + 7.1.1 + + + 7.1.1 + - 6.2.11 + 6.2.13 + + + 7.1.2 - - 7.0.0-preview2 + + 7.1.2 - 7.0.0-preview4 + 7.1.2 diff --git a/demo/GraphTutorial/MainPage.xaml b/demo/GraphTutorial/MainPage.xaml index b5131ca..b41d2a4 100644 --- a/demo/GraphTutorial/MainPage.xaml +++ b/demo/GraphTutorial/MainPage.xaml @@ -12,14 +12,10 @@ xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" xmlns:Interactivity="using:Microsoft.Xaml.Interactivity" xmlns:providers="using:Microsoft.Toolkit.Graph.Providers" - xmlns:wgt="using:Microsoft.Toolkit.Graph.Controls" + xmlns:wgt="using:CommunityToolkit.Graph.Uwp.Controls" mc:Ignorable="d" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - - - - // - private void ProviderUpdated(object sender, ProviderUpdatedEventArgs e) + private void ProviderUpdated(object sender, ProviderStateChangedEventArgs e) { var globalProvider = ProviderManager.Instance.GlobalProvider; SetAuthState(globalProvider != null && globalProvider.State == ProviderState.SignedIn); diff --git a/demo/GraphTutorial/NewEventPage.xaml b/demo/GraphTutorial/NewEventPage.xaml index 6f01aca..8f64618 100644 --- a/demo/GraphTutorial/NewEventPage.xaml +++ b/demo/GraphTutorial/NewEventPage.xaml @@ -2,7 +2,7 @@ Licensed under the MIT License. --> - using System.ComponentModel; +using CommunityToolkit.Authentication; +using CommunityToolkit.Graph.Extensions; using Microsoft.Graph; using Microsoft.Graph.Extensions; -using Microsoft.Toolkit.Graph.Providers; using Microsoft.Toolkit.Uwp.UI.Controls; using System.Runtime.CompilerServices; // @@ -171,7 +172,7 @@ public NewEventPage() protected override async void OnNavigatedTo(NavigationEventArgs e) { // Get the Graph client from the provider - var graphClient = ProviderManager.Instance.GlobalProvider.Graph; + var graphClient = ProviderManager.Instance.GlobalProvider.GetClient(); try { @@ -213,7 +214,7 @@ private async void CreateEvent(object sender, RoutedEventArgs e) CreateProgress.Visibility = Visibility.Visible; // Get the Graph client from the provider - var graphClient = ProviderManager.Instance.GlobalProvider.Graph; + var graphClient = ProviderManager.Instance.GlobalProvider.GetClient(); // Initialize a new Event object with the required fields var newEvent = new Event @@ -250,7 +251,7 @@ private async void CreateEvent(object sender, RoutedEventArgs e) Type = AttendeeType.Required, EmailAddress = new EmailAddress { - Address = person.EmailAddresses.First().Address + Address = person.ScoredEmailAddresses.First().Address } }); }