2 writes to sb
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
5307
sb
= new StringBuilder();
5335
sb
= null;
64 references to sb
System.Private.CoreLib (64)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (64)
5310
sb
.AppendLine("<instrumentationManifest xmlns=\"http://schemas.microsoft.com/win/2004/08/events\">");
5311
sb
.AppendLine(" <instrumentation xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:win=\"http://manifests.microsoft.com/win/2004/08/windows/events\">");
5312
sb
.AppendLine(" <events xmlns=\"http://schemas.microsoft.com/win/2004/08/events\">");
5313
sb
.Append($"<provider name=\"{providerName}\" guid=\"{{{providerGuid}}}\"");
5315
sb
.Append($" resourceFileName=\"{dllName}\" messageFileName=\"{dllName}\"");
5317
sb
.Append(" symbol=\"");
5318
int pos =
sb
.Length;
5319
sb
.Append(providerName); // Period and dash are illegal; replace them.
5320
sb
.Replace('.', '_', pos,
sb
.Length - pos).Replace("-", "", pos,
sb
.Length - pos);
5321
sb
.AppendLine("\">");
5646
sb
?.AppendLine(" <channels>");
5670
sb
?.Append(" <channel chid=\"").Append(channelInfo.Name).Append("\" name=\"").Append(fullName).Append('"');
5672
WriteMessageAttrib(
sb
, "channel", channelInfo.Name, null);
5673
sb
?.Append(" value=\"").Append(channel).Append('"');
5675
sb
?.Append(" type=\"").Append(channelType).Append('"');
5676
sb
?.Append(" enabled=\"").Append(enabled ? "true" : "false").AppendLine("\"/>");
5678
sb
?.AppendLine(" </channels>");
5684
sb
?.AppendLine(" <tasks>");
5690
sb
?.Append(" <task");
5691
WriteNameAndMessageAttribs(
sb
, "task", taskTab[task]);
5692
sb
?.Append(" value=\"").Append(task).AppendLine("\"/>");
5694
sb
?.AppendLine(" </tasks>");
5710
sb
?.AppendLine(" <maps>");
5715
sb
?.Append(" <").Append(mapKind).Append(" name=\"").Append(enumType.Name).AppendLine("\">");
5740
sb
?.Append(" <map value=\"0x").Append(hexValueFormatted).Append('"');
5741
WriteMessageAttrib(
sb
, "map", enumType.Name + "." + staticField.Name, staticField.Name);
5742
sb
?.AppendLine("/>");
5751
sb
?.Append(" <map value=\"0x0\"");
5752
WriteMessageAttrib(
sb
, "map", enumType.Name + ".None", "None");
5753
sb
?.AppendLine("/>");
5755
sb
?.Append(" </").Append(mapKind).AppendLine(">");
5757
sb
?.AppendLine(" </maps>");
5761
sb
?.AppendLine(" <opcodes>");
5767
sb
?.Append(" <opcode");
5768
WriteNameAndMessageAttribs(
sb
, "opcode", opcodeTab[opcode]);
5769
sb
?.Append(" value=\"").Append(opcode).AppendLine("\"/>");
5771
sb
?.AppendLine(" </opcodes>");
5776
sb
?.AppendLine(" <keywords>");
5782
sb
?.Append(" <keyword");
5783
WriteNameAndMessageAttribs(
sb
, "keyword", keywordTab[keyword]);
5786
sb
?.Append(" mask=\"0x").Append(keywordFormatted).AppendLine("\"/>");
5788
sb
?.AppendLine(" </keywords>");
5791
sb
?.AppendLine(" <events>");
5792
sb
?.Append(events);
5793
sb
?.AppendLine(" </events>");
5795
sb
?.AppendLine(" <templates>");
5798
sb
?.Append(templates);
5804
sb
?.AppendLine(" <template tid=\"_empty\"></template>");
5806
sb
?.AppendLine(" </templates>");
5808
sb
?.AppendLine("</provider>");
5809
sb
?.AppendLine("</events>");
5810
sb
?.AppendLine("</instrumentation>");
5813
sb
?.AppendLine("<localization>");
5820
sb
?.Append(" <resources culture=\"").Append(ci.Name).AppendLine("\">");
5821
sb
?.AppendLine(" <stringTable>");
5825
sb
?.Append(" <string id=\"").Append(stringKey).Append("\" value=\"").Append(val).AppendLine("\"/>");
5827
sb
?.AppendLine(" </stringTable>");
5828
sb
?.AppendLine(" </resources>");
5830
sb
?.AppendLine("</localization>");
5831
sb
?.AppendLine("</instrumentationManifest>");
5832
return
sb
?.ToString() ?? "";
5839
WriteMessageAttrib(
sb
, elementName, name, name);