System.Text.StringBuilder.Append(string)

Here are the examples of the csharp api class System.Text.StringBuilder.Append(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

1. Example

Project: alphaTab
Source File: StringBuilder.cs
public void AppendLine(string s = "")
        {
            _sb.Append(s).Append("\r\n");
        }

2. Example

Project: TESUnity
Source File: NIFParserGenerator.cs
private void Generate(string str)
        {
            strBuilder.Append(str);
        }

3. Example

Project: commandline
Source File: StringBuilderExtensions.cs
public static StringBuilder AppendWhen(this StringBuilder builder, bool condition, params string[] values)
        {
            if (condition)
                foreach (var value in values)
                    builder.Append(value);

            return builder;
        }

4. Example

Project: commandline
Source File: StringBuilderExtensions.cs
public static StringBuilder AppendIf(this StringBuilder builder, bool condition, string ifTrue, string ifFalse)
        {
            return condition
                ? builder.Append(ifTrue)
                : builder.Append(ifFalse);
        }

5. Example

Project: commandline
Source File: StringBuilderExtensions.cs
public static StringBuilder AppendIfNotEmpty(this StringBuilder builder, params string[] values)
        {
            foreach (var value in values)
                if (value.Length > 0)
                    builder.Append(value);

            return builder;
        }

6. Example

Project: RNGReporter
Source File: CSVWriter.cs
protected void GenerateHeader()
        {
            foreach (int columnIndex in selectedColumns)
            {
                if (dataGrid.Columns[columnIndex].HeaderText == "Flip Sequence")
                {
                    sb.Append("Flip1\tFlip2\tFlip3\tFlip4\tFlip5\t");
                    sb.Append("Flip6\tFlip7\tFlip8\tFlip9\tFlip10\t");
                }
                else if (dataGrid.Columns[columnIndex].HeaderText == "IVs (Black & White)")
                {
                    sb.Append("IV1\tIV2\tIV3\tIV4\tIV5\tIV6\tIV7\tIV8\tIV9\tIV10");
                }
                else
                    sb.Append(dataGrid.Columns[columnIndex].HeaderText + "\t");
            }

            sb.Append(Environment.NewLine);
        }

7. Example

Project: ContinuousTests
Source File: CoreExtensionsTests.cs
public Test Decorate(Test test, MemberInfo member)
            {
                sb.Append(name);
                return test;
            }

8. Example

Project: ContinuousTests
Source File: CoreExtensionsTests.cs
public Test Decorate(Test test, MemberInfo member)
            {
                sb.Append(name);
                return test;
            }

9. Example

Project: ContinuousTests
Source File: CoreExtensionsTests.cs
public Test Decorate(Test test, MemberInfo member)
            {
                sb.Append(name);
                return test;
            }

10. Example

Project: ContinuousTests
Source File: IGenericInstance.cs
public static void GenericInstanceFullName (this IGenericInstance self, StringBuilder builder)
		{
			builder.Append ("<");
			var arguments = self.GenericArguments;
			for (int i = 0; i < arguments.Count; i++) {
				if (i > 0)
					builder.Append (",");
				builder.Append (arguments [i].FullName);
			}
			builder.Append (">");
		}

11. Example

Project: ContinuousTests
Source File: IMethodSignature.cs
public static void MethodSignatureFullName (this IMethodSignature self, StringBuilder builder)
		{
			builder.Append ("(");

			if (self.HasParameters) {
				var parameters = self.Parameters;
				for (int i = 0; i < parameters.Count; i++) {
					var parameter = parameters [i];
					if (i > 0)
						builder.Append (",");

					if (parameter.ParameterType.IsSentinel)
						builder.Append ("...,");

					builder.Append (parameter.ParameterType.FullName);
				}
			}

			builder.Append (")");
		}

12. Example

Project: QuickUnity
Source File: XmlResultWriter.cs
private void WriteIndend()
        {
            for (int i = 0; i < m_Indend; i++)
            {
                m_ResultWriter.Append("  ");
            }
        }

13. Example

Project: GameCloud.Orleans
Source File: stream_c.cs
static int stmFullPathname(
    sqlite3_vfs pVfs,             /* Pointer to vfs object */
    string zRelative,             /* Possibly relative input path */
    int nFull,                    /* Size of output buffer in bytes */
    StringBuilder zFull           /* Output buffer */
    )
    {
      string zOut = zRelative;
      if ( zOut != null )
      {
        // sqlite3_snprintf(pVfs.mxPathname, zFull, "%s", zOut);
        if ( zFull.Length > pVfs.mxPathname )
          zFull.Length = pVfs.mxPathname;
        zFull.Append( zOut );

        // will happen on exit; was   free(zOut);
        return SQLITE_OK;
      }
      else
      {
        return SQLITE_NOMEM;
      }
    }

14. Example

Project: GameCloud.Orleans
Source File: stream_c.cs
static int stmFullPathname(
    sqlite3_vfs pVfs,             /* Pointer to vfs object */
    string zRelative,             /* Possibly relative input path */
    int nFull,                    /* Size of output buffer in bytes */
    StringBuilder zFull           /* Output buffer */
    )
    {
      string zOut = zRelative;
      if ( zOut != null )
      {
        // sqlite3_snprintf(pVfs.mxPathname, zFull, "%s", zOut);
        if ( zFull.Length > pVfs.mxPathname )
          zFull.Length = pVfs.mxPathname;
        zFull.Append( zOut );

        // will happen on exit; was   free(zOut);
        return SQLITE_OK;
      }
      else
      {
        return SQLITE_NOMEM;
      }
    }

15. Example

Project: SF-Boilerplate
Source File: JqGridJavaScriptRenderingHelper.cs
internal static StringBuilder AppendJavaScriptObjectOpening(this StringBuilder javaScriptBuilder)
        {
            return javaScriptBuilder.Append("{");
        }

16. Example

Project: tracer
Source File: MockLogAdapter.cs
private static void AddGenericPrettyFormat(StringBuilder sb, Type[] genericArgumentTypes)
        {
            sb.Append("<");
            for (int i = 0; i < genericArgumentTypes.Length; i++)
            {
                sb.Append(genericArgumentTypes[i].Name);
                if (i < genericArgumentTypes.Length - 1) sb.Append(", ");
            }
            sb.Append(">");
        }

17. Example

Project: tracer
Source File: LoggerAdapter.cs
private static void AddGenericPrettyFormat(StringBuilder sb, Type[] genericArgumentTypes)
        {
            sb.Append("<");
            for (int i = 0; i < genericArgumentTypes.Length; i++)
            {
                sb.Append(genericArgumentTypes[i].Name);
                if (i < genericArgumentTypes.Length - 1) sb.Append(", ");
            }
            sb.Append(">");
        }

18. Example

Project: tracer
Source File: LoggerAdapter.cs
private static void AddGenericPrettyFormat(StringBuilder sb, Type[] genericArgumentTypes)
        {
            sb.Append("<");
            for (var i = 0; i < genericArgumentTypes.Length; i++)
            {
                sb.Append(genericArgumentTypes[i].Name);
                if (i < genericArgumentTypes.Length - 1) sb.Append(", ");
            }
            sb.Append(">");
        }

19. Example

Project: tracer
Source File: LoggerAdapter.cs
private static void AddGenericPrettyFormat(StringBuilder sb, Type[] genericArgumentTypes)
        {
            sb.Append("<");
            for (var i = 0; i < genericArgumentTypes.Length; i++)
            {
                sb.Append(genericArgumentTypes[i].Name);
                if (i < genericArgumentTypes.Length - 1) sb.Append(", ");
            }
            sb.Append(">");
        }

20. Example

Project: tracer
Source File: LoggerAdapter.cs
private static void AddGenericPrettyFormat(StringBuilder sb, Type[] genericArgumentTypes)
        {
            sb.Append("<");
            for (var i = 0; i < genericArgumentTypes.Length; i++)
            {
                sb.Append(genericArgumentTypes[i].Name);
                if (i < genericArgumentTypes.Length - 1) sb.Append(", ");
            }
            sb.Append(">");
        }

21. Example

Project: BoC
Source File: Container.cs
public static StringBuilder Print(this StringBuilder s, string str, string quote = null)
        {
            return quote == null ? s.Append(str) : s.Append(quote).Append(str).Append(quote);
        }

22. Example

Project: cat.net
Source File: AbstractMessage.cs
public virtual void AddData(String keyValuePairs)
        {
            try
            {
                // No meaning to add null as data.
                if (null == keyValuePairs)
                    return;

                if (_mData == null)
                {
                    _mData = new StringBuilder(keyValuePairs);
                }
                else
                {
                    _mData.Append(keyValuePairs);
                }
            }
            catch (Exception ex)
            {
                Cat.lastException = ex;
            }
        }

23. Example

Project: Unity3D.Amqp
Source File: autogenerated-api-0-9-1.cs
public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
      sb.Append("(");
      sb.Append(")");
    }

24. Example

Project: Unity3D.Amqp
Source File: autogenerated-api-0-9-1.cs
public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
      sb.Append("(");
      sb.Append(m_reason);
      sb.Append(")");
    }

25. Example

Project: Unity3D.Amqp
Source File: autogenerated-api-0-9-1.cs
public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
      sb.Append("(");
      sb.Append(m_consumerTag);
      sb.Append(")");
    }

26. Example

Project: Taurus.MVC
Source File: Controller.cs
public void Write(string msg)
        {
            apiResult.Append(msg);
        }

27. Example

Project: AsyncFriendlyStackTrace
Source File: StackTraceExtensions.cs
private static void FormatGenericArguments(StringBuilder stringBuilder, Type[] genericArguments)
        {
            stringBuilder.Append("[");
            var k = 0;
            var firstTypeParam = true;
            while (k < genericArguments.Length)
            {
                if (!firstTypeParam)
                {
                    stringBuilder.Append(",");
                }
                else
                {
                    firstTypeParam = false;
                }
                stringBuilder.Append(genericArguments[k].Name);
                k++;
            }
            stringBuilder.Append("]");
        }

28. Example

Project: RoslynPad
Source File: StackTraceExtensions.cs
private static void FormatGenericArguments(StringBuilder stringBuilder, Type[] genericArguments)
        {
            stringBuilder.Append("[");
            var k = 0;
            var firstTypeParam = true;
            while (k < genericArguments.Length)
            {
                if (!firstTypeParam)
                {
                    stringBuilder.Append(",");
                }
                else
                {
                    firstTypeParam = false;
                }
                stringBuilder.Append(genericArguments[k].Name);
                k++;
            }
            stringBuilder.Append("]");
        }

29. Example

Project: Nancy.Hal
Source File: UriTemplate.cs
void AppendName(string variable, OperatorInfo op, bool valueIsEmpty)
        {
            this._Result.Append(variable);
            if (valueIsEmpty)
            {
                this._Result.Append(op.IfEmpty);
            }
            else
            {
                this._Result.Append("=");
            }
        }

30. Example

Project: finite-graph-machine
Source File: XmlResultWriter.cs
private void WriteIndend()
        {
            for (int i = 0; i < m_Indend; i++)
            {
                m_ResultWriter.Append("  ");
            }
        }

31. Example

Project: sqlsharpener
Source File: TextBuilder.cs
private void AppendIndent()
        {
            if (indent > 0)
            {
                var tabs = new String('\t', indent);
                this.StringBuilder.Append(tabs);
            }
        }

32. Example

Project: PhotonSharp
Source File: CodePrinter.cs
public void BeginLine()
        {
            _builder.Append(_indend);
        }

33. Example

Project: PhotonSharp
Source File: CodePrinter.cs
public void EndLine()
        {
            _builder.Append("\n");
        }

34. Example

Project: daxnet-blog
Source File: WhereClauseBuilder.cs
private void Out(string s)
        {
            sb.Append(s);
        }

35. Example

Project: we-text
Source File: WhereClauseBuilder.cs
private void Out(string s)
        {
            sb.Append(s);
        }

36. Example

Project: DotNet.Glob
Source File: GlobToRegexFormatter.cs
public void Visit(WildcardDirectoryToken wildcardDirectoryToken)
        {
            _stringBuilder.Append(".*");
            if(wildcardDirectoryToken.TrailingPathSeperator != null)
            {
                _stringBuilder.Append(@"[/\\]");               
            }
        }

37. Example

Project: DotNet.Glob
Source File: GlobToRegexFormatter.cs
void IGlobTokenVisitor.Visit(PathSeperatorToken token)
        {
            _stringBuilder.Append(@"[/\\]");
        }

38. Example

Project: DotNet.Glob
Source File: GlobToRegexFormatter.cs
void IGlobTokenVisitor.Visit(AnyCharacterToken token)
        {
            _stringBuilder.Append(@"[^/\\]{1}");
        }

39. Example

Project: DotNet.Glob
Source File: GlobToRegexFormatter.cs
void IGlobTokenVisitor.Visit(WildcardToken token)
        {
            _stringBuilder.Append(@"[^/\\]*");
        }

40. Example

Project: iMessageStickerUnity
Source File: Utils.cs
public void WriteStringBuilder(StringBuilder sb, string guid)
        {
            string comment = this[guid];
            if (comment == null)
                sb.Append(guid);
            else
            {
                // {0} /* {1} */
                sb.Append(guid).Append(" /* ").Append(comment).Append(" */");
            }
        }

41. Example

Project: iMessageStickerUnity
Source File: JsonParser.cs
void AppendIndent(StringBuilder sb, int indent)
        {
            for (int i = 0; i < indent; ++i)
                sb.Append(indentString);
        }

42. Example

Project: iMessageStickerUnity
Source File: JsonParser.cs
void WriteBoolean(StringBuilder sb, bool value)
        {
            sb.Append(value ? "true" : "false");
        }

43. Example

Project: OutlookPrivacyPlugin
Source File: DistributionPoint.cs
private void appendObject(
			StringBuilder	buf,
			string			sep,
			string			name,
			string			val)
		{
			string indent = "    ";

			buf.Append(indent);
			buf.Append(name);
			buf.Append(":");
			buf.Append(sep);
			buf.Append(indent);
			buf.Append(indent);
			buf.Append(val);
			buf.Append(sep);
		}

44. Example

Project: OutlookPrivacyPlugin
Source File: DistributionPointName.cs
private void appendObject(
			StringBuilder	buf,
			string			sep,
			string			name,
			string			val)
		{
			string indent = "    ";

			buf.Append(indent);
			buf.Append(name);
			buf.Append(":");
			buf.Append(sep);
			buf.Append(indent);
			buf.Append(indent);
			buf.Append(val);
			buf.Append(sep);
		}

45. Example

Project: OutlookPrivacyPlugin
Source File: IssuingDistributionPoint.cs
private void appendObject(
			StringBuilder	buf,
			string			sep,
			string			name,
			string			val)
		{
			string indent = "    ";

			buf.Append(indent);
			buf.Append(name);
			buf.Append(":");
			buf.Append(sep);
			buf.Append(indent);
			buf.Append(indent);
			buf.Append(val);
			buf.Append(sep);
		}

46. Example

Project: OutlookPrivacyPlugin
Source File: InternetAddressList.cs
internal void Encode (FormatOptions options, StringBuilder builder, ref int lineLength)
		{
			for (int i = 0; i < list.Count; i++) {
				if (i > 0)
					builder.Append (", ");

				list[i].Encode (options, builder, ref lineLength);
			}
		}

47. Example

Project: msgpack-unity3d
Source File: JsonStringBuilderWriter.cs
public override void WriteJson(string jsonString)
		{
			if (jsonString == null)
				throw new ArgumentNullException("jsonString");


			stringBuilder.Append(jsonString);
			this.CharactersWritten += jsonString.Length;
		}

48. Example

Project: DevExpress.Mvvm.Free
Source File: FunctionBindingBehaviorTests.cs
public override void Write(string message) {
            output.Append(message);
        }

49. Example

Project: Phalanger
Source File: RegExpPosix.cs
private void WriteOutWordBoundary(ref StringBuilder output)
			{
				if (buffer[parts[0]] == '<')
				{	// beginning of word
					output.Append(@"\b(?=\w)");
				}
				else
				{	// end of word
					output.Append(@"\b(?<=\w)");
				}
			}

50. Example

Project: Phalanger
Source File: Scanner.cs
private void StoreEncapsedString(string str)
        {
            tokenSemantics.Integer = str.Length;
            tokenSemantics.Offset = encapsedStringBuffer.Length;
            encapsedStringBuffer.Append(str);
        }