Exemple #1
0
 /// <summary>
 /// The get check url.
 /// </summary>
 /// <param name="text">
 /// The text.
 /// </param>
 /// <param name="method">
 /// The method.
 /// </param>
 /// <param name="matchEmail">
 /// The match email.
 /// </param>
 /// <param name="matchPhoneNumber">
 /// The match phone number.
 /// </param>
 /// <param name="language">
 /// The language.
 /// </param>
 /// <returns>
 /// returns URL for Web Purify REST service.
 /// </returns>
 internal string GetCheckUrl(
     string text,
     WebPurifyCheckMethod method,
     bool matchEmail,
     bool matchPhoneNumber,
     WebPurifySupportedLanguage language)
 {
     return
         (this.url.AddMethod(method).AddParam(WebPurifyArgument.ApiKey, this.key).AddParam(
              WebPurifyArgument.Text, text).AddParam(WebPurifyArgument.CheckEmail, matchEmail.ToUrl()).AddParam(
              WebPurifyArgument.CheckPhone, matchPhoneNumber.ToUrl()).AddParam(
              WebPurifyArgument.Language, WebPurifyUrlParameters.LanguageCode(language)));
 }
Exemple #2
0
 /// <summary>
 /// The get replace url.
 /// </summary>
 /// <param name="text">
 /// The text.
 /// </param>
 /// <param name="replaceSymbol">
 /// The replace symbol.
 /// </param>
 /// <param name="wrapCData">
 /// The wrap c data.
 /// </param>
 /// <param name="matchEmail">
 /// The match email.
 /// </param>
 /// <param name="matchPhoneNumber">
 /// The match phone number.
 /// </param>
 /// <param name="language">
 /// The language.
 /// </param>
 /// <returns>
 /// returns URL for Web Purify REST service.
 /// </returns>
 internal string GetReplaceUrl(
     string text,
     char replaceSymbol,
     bool wrapCData,
     bool matchEmail,
     bool matchPhoneNumber,
     WebPurifySupportedLanguage language)
 {
     return
         (this.url.AddReplaceMethod().AddParam(WebPurifyArgument.ApiKey, this.key).AddParam(
              WebPurifyArgument.Text, text).AddParam(WebPurifyArgument.ReplaceSymbol, replaceSymbol.ToString()).
          AddParam(WebPurifyArgument.CDataWrap, wrapCData.ToUrl()).AddParam(
              WebPurifyArgument.CheckEmail, matchEmail.ToUrl()).AddParam(
              WebPurifyArgument.CheckPhone, matchPhoneNumber.ToUrl()).AddParam(
              WebPurifyArgument.Language, WebPurifyUrlParameters.LanguageCode(language)));
 }