コード例 #1
0
        /// <summary>
        /// The param text.
        /// </summary>
        /// <param name="argument">
        /// The argument.
        /// </param>
        /// <returns>
        /// The param text string.
        /// </returns>
        public static string ParamText(WebPurifyArgument argument)
        {
            switch (argument)
            {
            case WebPurifyArgument.ApiKey:
                return("api_key");

            case WebPurifyArgument.CDataWrap:
                return("cdata");

            case WebPurifyArgument.CheckEmail:
                return("semail");

            case WebPurifyArgument.CheckPhone:
                return("sphone");

            case WebPurifyArgument.Language:
                return("lang");

            case WebPurifyArgument.ListWord:
                return("word");

            case WebPurifyArgument.ReplaceSymbol:
                return("replacesymbol");

            case WebPurifyArgument.Text:
                return("text");

            default:
                return(string.Empty);
            }
        }
コード例 #2
0
 /// <summary>
 /// The add param.
 /// </summary>
 /// <param name="url">
 /// The url.
 /// </param>
 /// <param name="argument">
 /// The argument.
 /// </param>
 /// <param name="value">
 /// The value.
 /// </param>
 /// <returns>
 /// adds a querystring parameter to the url
 /// </returns>
 public static string AddParam(this string url, WebPurifyArgument argument, string value)
 {
     return(url + "&" + ParamText(argument) + "=" + value.Trim());
 }
コード例 #3
0
 /// <summary>
 /// The add param.
 /// </summary>
 /// <param name="url">
 /// The url.
 /// </param>
 /// <param name="argument">
 /// The argument.
 /// </param>
 /// <param name="value">
 /// The value.
 /// </param>
 /// <returns>
 /// adds a querystring parameter to the url
 /// </returns>
 public static string AddParam(this string url, WebPurifyArgument argument, string value)
 {
     return url + "&" + ParamText(argument) + "=" + value.Trim().ToEncodedUrl();
 }
コード例 #4
0
 /// <summary>
 /// The param text.
 /// </summary>
 /// <param name="argument">
 /// The argument.
 /// </param>
 /// <returns>
 /// The param text string.
 /// </returns>
 public static string ParamText(WebPurifyArgument argument)
 {
     switch (argument)
     {
         case WebPurifyArgument.ApiKey:
             return "api_key";
         case WebPurifyArgument.CDataWrap:
             return "cdata";
         case WebPurifyArgument.CheckEmail:
             return "semail";
         case WebPurifyArgument.CheckPhone:
             return "sphone";
         case WebPurifyArgument.Language:
             return "lang";
         case WebPurifyArgument.ListWord:
             return "word";
         case WebPurifyArgument.ReplaceSymbol:
             return "replacesymbol";
         case WebPurifyArgument.Text:
             return "text";
         default:
             return string.Empty;
     }
 }