当前位置: 首页>>代码示例>>C#>>正文


C# StringBuilder.toString方法代码示例

本文整理汇总了C#中System.Text.StringBuilder.toString方法的典型用法代码示例。如果您正苦于以下问题:C# StringBuilder.toString方法的具体用法?C# StringBuilder.toString怎么用?C# StringBuilder.toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Text.StringBuilder的用法示例。


在下文中一共展示了StringBuilder.toString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: toURIQuery

	public String toURIQuery()
	{
		StringBuilder sb = new StringBuilder();
		sb.append("https=");
		sb.append(https);
		sb.append("&saml=");
		sb.append(saml);
		sb.append("&refs=");
		sb.append(refs);
		sb.append("&no_default_t=");
		sb.append(noDefaultT);
		sb.append("&no_default_p=");
		sb.append(noDefaultP);
		sb.append("&no_default_m=");
		sb.append(noDefaultM);
		sb.append("&uric=");
		sb.append(uric);
		sb.append("&cid=");
		sb.append(cid);

		return sb.toString();		
	}
开发者ID:tt,项目名称:dotnetxri,代码行数:22,代码来源:ResolverFlags.cs

示例2: getTrustParameters

	public String getTrustParameters() {
		StringBuilder sb = new StringBuilder();
		sb.append(MimeType.PARAM_HTTPS);
		sb.append("=");
		sb.append(isHttps()? "true" : "false");
		sb.append(";");
		sb.append(MimeType.PARAM_SAML);
		sb.append("=");
		sb.append(isSaml()? "true" : "false");
		return sb.toString();
	}
开发者ID:tt,项目名称:dotnetxri,代码行数:11,代码来源:ResolverFlags.cs

示例3: toString

	public String toString()
	{
		StringBuilder sb = new StringBuilder();
		sb.append("ResolverFlags (");
		sb.append(toURIQuery());
		sb.append(")");

		return sb.toString();
	}
开发者ID:tt,项目名称:dotnetxri,代码行数:9,代码来源:ResolverFlags.cs

示例4: mHereDocContents

	private void mHereDocContents()
	{
		EnterRule_HereDocContents();
		EnterRule("HereDocContents", 121);
		TraceIn("HereDocContents", 121);
		try
		{
			// Php.g:736:2: ()
			DebugEnterAlt(1);
			// Php.g:736:4: 
			{
			DebugLocation(736, 4);
			if (state.backtracking == 0)
			{

						// Please see also Code2Xml.Languages.ANTLRv3.Core.ExtensionForParser
						var sb = new StringBuilder();
						while (input.LA(1) != '\n') {
							sb.append((char)input.LA(1));
							input.consume();
						}
						input.consume();
						var hereDocName = sb.toString().TrimEnd();
						var hdnl = hereDocName.length();
						while (true) {
							var matchEnd = true;
							for (int i = 0; i < hdnl; i++) {
								if (input.LA(1) != hereDocName.charAt(i)) {
									matchEnd = false;
									break;
								}
								input.consume();
							}
							if (matchEnd == false) {
								while (input.LA(1) != '\n') {
									input.consume();
								}
								input.consume();
							} else {
								break;
							}
						}
					
			}

			}

		}
		finally
		{
			TraceOut("HereDocContents", 121);
			LeaveRule("HereDocContents", 121);
			LeaveRule_HereDocContents();
		}
	}
开发者ID:RainsSoft,项目名称:Code2Xml,代码行数:55,代码来源:PhpLexer.cs

示例5: CreateDocument

 private Document CreateDocument(int n, string indexName,
     int numFields, string format)
 {
     StringBuilder sb = new StringBuilder();
     Document doc = new Document();
     string id = string.Format(CultureInfo.InvariantCulture, format, n);
     doc.Add(NewStringField("id", id, Field.Store.YES));
     doc.Add(NewStringField("indexname", indexName, Field.Store.YES));
     sb.append("a");
     sb.append(n);
     doc.Add(NewTextField("field1", sb.toString(), Field.Store.YES));
     sb.append(" b");
     sb.append(n);
     for (int i = 1; i < numFields; i++)
     {
         doc.Add(NewTextField("field" + (i + 1), sb.toString(), Field.Store.YES));
     }
     return doc;
 }
开发者ID:ChristopherHaws,项目名称:lucenenet,代码行数:19,代码来源:TestPKIndexSplitter.cs

示例6: testRandomQueries2

 public virtual void testRandomQueries2()
 {
     char[] chars = new char[] { 'a', '1', '|', '&', ' ', '(', ')', '"', '-', '~' };
     StringBuilder sb = new StringBuilder();
     for (int i = 0; i < 1000; i++)
     {
         sb.Length = (0);
         int queryLength = Random().Next(20);
         for (int j = 0; j < queryLength; j++)
         {
             sb.append(chars[Random().Next(chars.Length)]);
         }
         Parse(sb.toString()); // no exception
         ParseKeyword(sb.toString(), TestUtil.NextInt(Random(), 0, 1024)); // no exception
     }
 }
开发者ID:ChristopherHaws,项目名称:lucenenet,代码行数:16,代码来源:TestSimpleQueryParser.cs

示例7: toString

		public String toString()
		{
			StringBuilder sb = new StringBuilder();
			sb.append("QXRI=");
			sb.append(qxri);
			sb.append(", trust=");
			sb.append(trust);
			sb.append(", uri=");
			sb.append((uri == null)? "null" : uri.toASCIIString());
			sb.append(", ref=");
			sb.append(ref);
			sb.append(", elapsed=");
			sb.append(timeCompleted - timeStarted);
			sb.append("ms\n\nXRDS = \n");
			sb.append(xrds);
			return sb.toString();
		}
开发者ID:tt,项目名称:dotnetxri,代码行数:17,代码来源:ResolverState.cs


注:本文中的System.Text.StringBuilder.toString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。