summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-07-18 20:57:11 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-07-18 20:57:11 -0700
commitc34d74ed81bcac18961272d52dc5bab21a3394fa (patch)
tree89b31dc706da875c60af1533feca848a03387207 /src
parent214b304aa178d286e440e6458e2ae173a64193b1 (diff)
downloadDotNetOpenAuth-c34d74ed81bcac18961272d52dc5bab21a3394fa.zip
DotNetOpenAuth-c34d74ed81bcac18961272d52dc5bab21a3394fa.tar.gz
DotNetOpenAuth-c34d74ed81bcac18961272d52dc5bab21a3394fa.tar.bz2
Minor sample adjustment.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/Messaging/MessagingUtilities.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs
index b229bb8..d652051 100644
--- a/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs
+++ b/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs
@@ -218,6 +218,22 @@ namespace DotNetOpenAuth.Messaging {
}
/// <summary>
+ /// Adds a name-value pair to the end of a given URL
+ /// as part of the querystring piece. Prefixes a ? or &amp; before
+ /// first element as necessary.
+ /// </summary>
+ /// <param name="builder">The UriBuilder to add arguments to.</param>
+ /// <param name="name">The name of the parameter to add.</param>
+ /// <param name="value">The value of the argument.</param>
+ /// <remarks>
+ /// If the parameters to add match names of parameters that already are defined
+ /// in the query string, the existing ones are <i>not</i> replaced.
+ /// </remarks>
+ public static void AppendQueryArgument(this UriBuilder builder, string name, string value) {
+ AppendQueryArgs(builder, new[] { new KeyValuePair<string, string>(name, value) });
+ }
+
+ /// <summary>
/// Strips any and all URI query parameters that serve as parts of a message.
/// </summary>
/// <param name="uri">The URI that may contain query parameters to remove.</param>