本文整理汇总了C#中StringBuilder.Append2方法的典型用法代码示例。如果您正苦于以下问题:C# StringBuilder.Append2方法的具体用法?C# StringBuilder.Append2怎么用?C# StringBuilder.Append2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringBuilder
的用法示例。
在下文中一共展示了StringBuilder.Append2方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getParameterString
public virtual String getParameterString()
{
StringBuilder builder = new StringBuilder("");
if (Url != null)
builder.Append2("&url=", HttpUtility.UrlEncode(Url));
if (Html != null)
builder.Append2("&html=", HttpUtility.UrlEncode(Html));
if (Text != null)
builder.Append2("&text=", HttpUtility.UrlEncode(Text));
if (CustomParameters != null)
builder.Append(CustomParameters);
if (OutputMode != OutputMode.None)
{
if (OutputMode == OutputMode.Xml)
builder.Append("&outputMode=xml");
else if (OutputMode == OutputMode.Rdf)
builder.Append("&outputMode=rdf");
}
return builder.ToString();
}
示例2: getParameterString
public override String getParameterString()
{
StringBuilder builder = new StringBuilder(base.getParameterString());
builder.Append(SourceTextMode.GetUrlParameter());
if (ShowSourceText.HasValue)
builder.Append2("&showSourceText=", (ShowSourceText.Value ? "1" : "0"));
if (Disambiguate.HasValue)
builder.Append2("&disambiguate=", (Disambiguate.Value ? "1" : "0"));
if (LinkedData.HasValue)
builder.Append2("&linkedData=", (LinkedData.Value ? "1" : "0"));
if (Coreference.HasValue)
builder.Append2("&coreference=", (Coreference.Value ? "1" : "0"));
if (Quotations.HasValue)
builder.Append2(""ations=", (Quotations.Value ? "1" : "0"));
if (Sentiment.HasValue)
builder.Append2("&sentiment=", (Sentiment.Value ? "1" : "0"));
if (CQuery != null)
builder.Append2("&cquery=", HttpUtility.UrlEncode(CQuery));
if (XPath != null)
builder.Append2("&xpath=", HttpUtility.UrlEncode(XPath));
if (MaxRetrieve.HasValue)
builder.Append2("&maxRetrieve=", MaxRetrieve.Value.ToString(CultureInfo.InvariantCulture));
if (BaseUrl != null)
builder.Append2("&baseUrl=", HttpUtility.UrlEncode(BaseUrl));
return builder.ToString();
}
示例3: getParameterString
public override String getParameterString()
{
StringBuilder builder = new StringBuilder(base.getParameterString());
if (ShowSourceText.HasValue)
builder.Append2("&showSourceText=", (ShowSourceText.Value ? "1" : "0"));
if (Target != null)
builder.Append2("&target=", HttpUtility.UrlEncode(Target));
return builder.ToString();
}
示例4: getParameterString
public override String getParameterString()
{
StringBuilder builder = new StringBuilder(base.getParameterString());
if (UseMetadata.HasValue)
builder.Append2("&useMetadata=", (UseMetadata.Value ? "1" : "0"));
if (ExtractLinks.HasValue)
builder.Append2("&extractLinks=", (ExtractLinks.Value ? "1" : "0"));
return builder.ToString();
}
示例5: getParameterString
public override String getParameterString()
{
StringBuilder builder = new StringBuilder(base.getParameterString());
builder.Append(SourceTextMode.GetUrlParameter());
if (CQuery != null)
builder.Append2("&cquery=", HttpUtility.UrlEncode(CQuery));
if (XPath != null)
builder.Append2("&xpath=", HttpUtility.UrlEncode(XPath));
return builder.ToString();
}
示例6: getParameterString
public override String getParameterString()
{
StringBuilder builder = new StringBuilder(base.getParameterString());
builder.Append(SourceTextMode.GetUrlParameter());
if (ShowSourceText.HasValue)
builder.Append2("&showSourceText=", (ShowSourceText.Value ? "1" : "0"));
if (LinkedData.HasValue)
builder.Append2("&linkedData=", (LinkedData.Value ? "1" : "0"));
if (CQuery != null)
builder.Append2("&cquery=", HttpUtility.UrlEncode(CQuery));
if (XPath != null)
builder.Append2("&xpath=", HttpUtility.UrlEncode(XPath));
if (MaxRetrieve.HasValue)
builder.Append2("&maxRetrieve=", MaxRetrieve.Value.ToString(CultureInfo.InvariantCulture));
return builder.ToString();
}
示例7: getParameterString
public override String getParameterString()
{
StringBuilder builder = new StringBuilder(base.getParameterString());
builder.Append(SourceTextMode.GetUrlParameter());
if (ShowSourceText.HasValue)
builder.Append2("&showSourceText=", (ShowSourceText.Value ? "1" : "0"));
if (Sentiment.HasValue)
builder.Append2("&sentiment=", (Sentiment.Value ? "1" : "0"));
if (CQuery != null)
builder.Append2("&cquery=", HttpUtility.UrlEncode(CQuery));
if (XPath != null)
builder.Append2("&xpath=", HttpUtility.UrlEncode(XPath));
if (MaxRetrieve.HasValue)
builder.Append2("&maxRetrieve=", MaxRetrieve.ToString());
if (BaseUrl != null)
builder.Append2("&baseUrl=", HttpUtility.UrlEncode(BaseUrl));
if (KeywordExtractMode != KeywordExtractModes.None)
builder.Append2("&keywordExtractMode=", (KeywordExtractModes.Strict == KeywordExtractMode ? "strict" : "normal"));
return builder.ToString();
}
示例8: SetCustomParameters
public void SetCustomParameters(params object[] argsRest)
{
StringBuilder builder = new StringBuilder("");
for (int i = 0; i < argsRest.Length; ++i)
{
builder.Append2("&", argsRest[i].ToString());
if (++i < argsRest.Length)
builder.Append2("=", HttpUtility.UrlEncode((string)argsRest[i]));
}
CustomParameters = builder.ToString();
}