コード例 #1
0
 public void AddUrlSegment(string name, string value)
 {
     if (!UrlSegments.ContainsKey(name))
     {
         UrlSegments.Add(name, value);
     }
     else
     {
         UrlSegments[name] = value;
     }
 }
コード例 #2
0
 /// <summary>
 /// Appends a key/value pair to the end of the existing QueryString in a URI.
 /// </summary>
 /// <param name="key">The string key to append to the QueryString.</param>
 /// <param name="value">The string value to append to the QueryString.</param>
 public void AddQueryString(string key, string value)
 {
     UrlSegments.Add(new UrlSegment(key, value, true));
 }
コード例 #3
0
 /// <summary>
 /// Replaces tokenized segments of the URL with a desired value.
 /// </summary>
 /// <param name="key"></param>
 /// <param name="value"></param>
 /// <example>If <code>Resource = "{entity}/Samples.aspx"</code> and <code>someVariable.Publisher = "Disney";</code>, then
 /// <code>Resource.AddUrlSegment("entity", someVariable.Publisher);</code> becomes <code>Resource = "Disney/Samples.aspx";</code></example>
 public void AddUrlSegment(string key, string value)
 {
     UrlSegments.Add(new UrlSegment(key, value));
 }
コード例 #4
0
 public IHttpRequest AddUrlSegment(string key, string value)
 {
     UrlSegments.Add(key, value);
     return(this);
 }
コード例 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="key"></param>
 /// <param name="value"></param>
 public void AddUrlSegment(string key, string value)
 {
     UrlSegments.Add(new KeyValuePair <string, string>(key, value));
 }