summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/UriUtil.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOAuth/UriUtil.cs')
-rw-r--r--src/DotNetOAuth/UriUtil.cs29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/DotNetOAuth/UriUtil.cs b/src/DotNetOAuth/UriUtil.cs
index 9ce913d..74f9e3e 100644
--- a/src/DotNetOAuth/UriUtil.cs
+++ b/src/DotNetOAuth/UriUtil.cs
@@ -1,12 +1,29 @@
-using System;
-using System.Collections.Specialized;
-using System.Linq;
-using System.Web;
+//-----------------------------------------------------------------------
+// <copyright file="UriUtil.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
namespace DotNetOAuth {
- class UriUtil {
+ using System;
+ using System.Collections.Specialized;
+ using System.Linq;
+ using System.Web;
+
+ /// <summary>
+ /// Utility methods for working with URIs.
+ /// </summary>
+ internal class UriUtil {
+ /// <summary>
+ /// Tests a URI for the presence of an OAuth payload.
+ /// </summary>
+ /// <param name="uri">The URI to test.</param>
+ /// <returns>True if the URI contains an OAuth message.</returns>
internal static bool QueryStringContainsOAuthParameters(Uri uri) {
- if (uri == null) return false;
+ if (uri == null) {
+ return false;
+ }
+
NameValueCollection nvc = HttpUtility.ParseQueryString(uri.Query);
return nvc.Keys.OfType<string>().Any(key => key.StartsWith(Protocol.V10.ParameterPrefix, StringComparison.Ordinal));
}