diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-27 09:46:47 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-27 09:46:47 -0700 |
commit | 7fda43b0eece0204231bfbda881ada7e8fbb035b (patch) | |
tree | 105a74788a5849b0fbf827df094aa2f9d876cd50 /samples/OAuthClient | |
parent | 5a0a8ee4c55f323a6c1fbdb619cd89b7d28a94ba (diff) | |
download | DotNetOpenAuth-7fda43b0eece0204231bfbda881ada7e8fbb035b.zip DotNetOpenAuth-7fda43b0eece0204231bfbda881ada7e8fbb035b.tar.gz DotNetOpenAuth-7fda43b0eece0204231bfbda881ada7e8fbb035b.tar.bz2 |
Made AppBlock GetGraph methods async
Diffstat (limited to 'samples/OAuthClient')
-rw-r--r-- | samples/OAuthClient/Facebook.aspx.cs | 2 | ||||
-rw-r--r-- | samples/OAuthClient/Google.aspx.cs | 6 | ||||
-rw-r--r-- | samples/OAuthClient/WindowsLive.aspx.cs | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/samples/OAuthClient/Facebook.aspx.cs b/samples/OAuthClient/Facebook.aspx.cs index 5afc945..101b7f6 100644 --- a/samples/OAuthClient/Facebook.aspx.cs +++ b/samples/OAuthClient/Facebook.aspx.cs @@ -32,7 +32,7 @@ // alternatively you can ask for more information // facebookClient.RequestUserAuthorization(scope: new[] { FacebookClient.Scopes.Email, FacebookClient.Scopes.UserBirthday }); } else { - IOAuth2Graph oauth2Graph = facebookClient.GetGraph(authorization); + IOAuth2Graph oauth2Graph = await facebookClient.GetGraphAsync(authorization, cancellationToken: ct); //// IOAuth2Graph oauth2Graph = facebookClient.GetGraph(authorization, new[] { FacebookGraph.Fields.Defaults, FacebookGraph.Fields.Email, FacebookGraph.Fields.Picture, FacebookGraph.Fields.Birthday }); this.nameLabel.Text = HttpUtility.HtmlEncode(oauth2Graph.Name); diff --git a/samples/OAuthClient/Google.aspx.cs b/samples/OAuthClient/Google.aspx.cs index 7d0c77e..e0c4941 100644 --- a/samples/OAuthClient/Google.aspx.cs +++ b/samples/OAuthClient/Google.aspx.cs @@ -5,11 +5,9 @@ using System.Net; using System.Web; using System.Web.UI; - using DotNetOpenAuth.ApplicationBlock; - using DotNetOpenAuth.OAuth2; - using DotNetOpenAuth.Messaging; + using DotNetOpenAuth.OAuth2; public partial class Google : System.Web.UI.Page { @@ -33,7 +31,7 @@ // alternatively you can ask for more information // googleClient.RequestUserAuthorization(scope: new[] { GoogleClient.Scopes.UserInfo.Profile, GoogleClient.Scopes.UserInfo.Email }); } else { - IOAuth2Graph oauth2Graph = googleClient.GetGraph(authorization); + IOAuth2Graph oauth2Graph = await googleClient.GetGraphAsync(authorization, cancellationToken: ct); this.nameLabel.Text = HttpUtility.HtmlEncode(oauth2Graph.Name); } diff --git a/samples/OAuthClient/WindowsLive.aspx.cs b/samples/OAuthClient/WindowsLive.aspx.cs index 61dc443..e2adad9 100644 --- a/samples/OAuthClient/WindowsLive.aspx.cs +++ b/samples/OAuthClient/WindowsLive.aspx.cs @@ -43,7 +43,7 @@ // alternatively you can ask for more information // windowsLiveClient.RequestUserAuthorization(scope: new[] { WindowsLiveClient.Scopes.SignIn, WindowsLiveClient.Scopes.Emails, WindowsLiveClient.Scopes.Birthday }); } else { - IOAuth2Graph oauth2Graph = windowsLiveClient.GetGraph(authorization); + IOAuth2Graph oauth2Graph = await windowsLiveClient.GetGraphAsync(authorization, cancellationToken: ct); this.nameLabel.Text = HttpUtility.HtmlEncode(oauth2Graph.Name); } |