diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-02-10 21:31:06 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-02-10 21:31:06 -0800 |
commit | 938a79f28b0fb5718cc58f8f20be5d4207bc189f (patch) | |
tree | 46ba83af2172889824c42e1ef452d8cfd2789b16 /samples/DotNetOpenAuth.ApplicationBlock | |
parent | 8d530aa91c05b14be12c5b1177f39eb5f62c669e (diff) | |
download | DotNetOpenAuth-938a79f28b0fb5718cc58f8f20be5d4207bc189f.zip DotNetOpenAuth-938a79f28b0fb5718cc58f8f20be5d4207bc189f.tar.gz DotNetOpenAuth-938a79f28b0fb5718cc58f8f20be5d4207bc189f.tar.bz2 |
C# compiler warning fixes.
Diffstat (limited to 'samples/DotNetOpenAuth.ApplicationBlock')
-rw-r--r-- | samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs | 16 | ||||
-rw-r--r-- | samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs | 14 |
2 files changed, 21 insertions, 9 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs b/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs index 4842e96..a6a6e9f 100644 --- a/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs +++ b/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs @@ -179,6 +179,7 @@ namespace DotNetOpenAuth.ApplicationBlock /// </summary> /// <param name="consumer">The Google consumer previously constructed using <see cref="CreateWebConsumer"/> or <see cref="CreateDesktopConsumer"/>.</param> /// <param name="requestedAccessScope">The requested access scope.</param> + /// <param name="cancellationToken">The cancellation token.</param> public static async Task RequestAuthorizationAsync(WebConsumer consumer, Applications requestedAccessScope, CancellationToken cancellationToken = default(CancellationToken)) { if (consumer == null) { throw new ArgumentNullException("consumer"); @@ -196,10 +197,13 @@ namespace DotNetOpenAuth.ApplicationBlock /// <summary> /// Requests authorization from Google to access data from a set of Google applications. /// </summary> - /// <param name="consumer">The Google consumer previously constructed using <see cref="CreateWebConsumer"/> or <see cref="CreateDesktopConsumer"/>.</param> + /// <param name="consumer">The Google consumer previously constructed using <see cref="CreateWebConsumer" /> or <see cref="CreateDesktopConsumer" />.</param> /// <param name="requestedAccessScope">The requested access scope.</param> - /// <param name="requestToken">The unauthorized request token assigned by Google.</param> - /// <returns>The URI to redirect to and the request token.</returns> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns> + /// The URI to redirect to and the request token. + /// </returns> + /// <exception cref="System.ArgumentNullException">consumer</exception> public static Task<Tuple<Uri, string>> RequestAuthorizationAsync(DesktopConsumer consumer, Applications requestedAccessScope, CancellationToken cancellationToken = default(CancellationToken)) { if (consumer == null) { throw new ArgumentNullException("consumer"); @@ -219,7 +223,11 @@ namespace DotNetOpenAuth.ApplicationBlock /// <param name="accessToken">The access token previously retrieved.</param> /// <param name="maxResults">The maximum number of entries to return. If you want to receive all of the contacts, rather than only the default maximum, you can specify a very large number here.</param> /// <param name="startIndex">The 1-based index of the first result to be retrieved (for paging).</param> - /// <returns>An XML document returned by Google.</returns> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns> + /// An XML document returned by Google. + /// </returns> + /// <exception cref="System.ArgumentNullException">consumer</exception> public static async Task<XDocument> GetContactsAsync(ConsumerBase consumer, string accessToken, int maxResults = 25, int startIndex = 1, CancellationToken cancellationToken = default(CancellationToken)) { if (consumer == null) { throw new ArgumentNullException("consumer"); diff --git a/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs b/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs index 0cec2da..48e6b4b 100644 --- a/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs +++ b/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs @@ -159,8 +159,8 @@ namespace DotNetOpenAuth.ApplicationBlock { var imageAttachment = new StreamContent(File.OpenRead(image)); imageAttachment.Headers.ContentType = new MediaTypeHeaderValue("image/" + Path.GetExtension(image).Substring(1).ToLowerInvariant()); var parts = new List<MultipartContentMember> { - new MultipartContentMember(imageAttachment , "image"), - new MultipartContentMember(new StringContent(tile.ToString().ToLowerInvariant()) , "tile"), + new MultipartContentMember(imageAttachment, "image"), + new MultipartContentMember(new StringContent(tile.ToString().ToLowerInvariant()), "tile"), }; HttpRequestMessage request = await twitter.PrepareAuthorizedRequestAsync(UpdateProfileBackgroundImageEndpoint, accessToken, parts, cancellationToken); request.Headers.ExpectContinue = false; @@ -181,7 +181,7 @@ namespace DotNetOpenAuth.ApplicationBlock { var imageAttachment = new StreamContent(image); imageAttachment.Headers.ContentType = new MediaTypeHeaderValue(contentType); var parts = new List<MultipartContentMember> { - new MultipartContentMember(imageAttachment,"image", "twitterPhoto"), + new MultipartContentMember(imageAttachment, "image", "twitterPhoto"), }; HttpRequestMessage request = await twitter.PrepareAuthorizedRequestAsync(UpdateProfileImageEndpoint, accessToken, parts, cancellationToken); @@ -214,9 +214,12 @@ namespace DotNetOpenAuth.ApplicationBlock { /// Prepares a redirect that will send the user to Twitter to sign in. /// </summary> /// <param name="forceNewLogin">if set to <c>true</c> the user will be required to re-enter their Twitter credentials even if already logged in to Twitter.</param> - /// <returns>The redirect message.</returns> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns> + /// The redirect message. + /// </returns> /// <remarks> - /// Call <see cref="OutgoingWebResponse.Send"/> or + /// Call <see cref="OutgoingWebResponse.Send" /> or /// <c>return StartSignInWithTwitter().<see cref="MessagingUtilities.AsActionResult">AsActionResult()</see></c> /// to actually perform the redirect. /// </remarks> @@ -234,6 +237,7 @@ namespace DotNetOpenAuth.ApplicationBlock { /// Checks the incoming web request to see if it carries a Twitter authentication response, /// and provides the user's Twitter screen name and unique id if available. /// </summary> + /// <param name="cancellationToken">The cancellation token.</param> /// <returns> /// A tuple with the screen name and Twitter unique user ID if successful; otherwise <c>null</c>. /// </returns> |