示例#1
0
 /// <summary>
 /// Checks if all the given keys are present in the GET Parameters.
 /// </summary>
 /// <returns><c>false</c>, if at least one key is missing <c>false</c> otherwise.</returns>
 /// <param name="keys">Keys.</param>
 public bool HasGET(params string[] keys)
 {
     foreach (string key in keys)
     {
         if (!GETParams.ContainsKey(key))
         {
             return(false);
         }
     }
     return(true);
 }
示例#2
0
 /// <summary>
 /// Returns the GET parameter with the given key, or the defaultValue if it doesnt exist.
 /// </summary>
 /// <param name="key"></param>
 /// <param name="defaultValue">The value to return if this parameter doesn't exist</param>
 /// <returns></returns>
 public string GET(string key, string defaultValue = null)
 {
     return(GETParams.ContainsKey(key) ? GETParams[key] : defaultValue);
 }