3 writes to _stringBuilder
System.Private.Xml (3)
System\Xml\Core\XmlTextReaderImpl.cs (3)
308
_stringBuilder
= new StringBuilder();
335
_stringBuilder
= new StringBuilder();
399
_stringBuilder
= new StringBuilder();
135 references to _stringBuilder
System.Private.Xml (135)
System\Xml\Core\XmlTextReaderImpl.cs (76)
2166
Debug.Assert(
_stringBuilder
.Length == 0);
2178
_stringBuilder
.Append(_ps.chars, _incReadLeftStartPos, _incReadLeftEndPos - _incReadLeftStartPos);
2191
_stringBuilder
.Append(_ps.chars, _ps.charPos, _ps.charsUsed - _ps.charPos);
2197
string remainer =
_stringBuilder
.ToString();
2198
_stringBuilder
.Length = 0;
3609
Debug.Assert(
_stringBuilder
.Length == 0 || isTextDecl);
3610
StringBuilder sb = isTextDecl ? new StringBuilder() :
_stringBuilder
;
4267
_stringBuilder
.Length = 0;
4275
_stringBuilder
.Append(el.GetNameWPrefix(_nameTable));
4278
_stringBuilder
.Append(", ");
4282
_stringBuilder
.Append('.');
4286
Throw(_ps.charsUsed, SR.Xml_UnexpectedEOFInElementContent,
_stringBuilder
.ToString());
5103
Debug.Assert(
_stringBuilder
.Length == 0);
5115
_stringBuilder
.Append(chars, _ps.charPos, pos - _ps.charPos);
5133
_stringBuilder
.Append((char)0x20); // CDATA normalization of 0xA
5143
_stringBuilder
.Append(_ps.eolNormalized ? "\u0020\u0020" : "\u0020"); // CDATA normalization of 0xD 0xA
5152
_stringBuilder
.Append((char)0x20); // CDATA normalization of 0xD and 0xD 0xA
5167
_stringBuilder
.Append((char)0x20); // CDATA normalization of 0x9
5184
_stringBuilder
.Append(chars, _ps.charPos, pos - _ps.charPos);
5200
int valueChunkLen =
_stringBuilder
.Length - valueChunkStartPos;
5206
textChunk.SetValueNode(XmlNodeType.Text,
_stringBuilder
.ToString(valueChunkStartPos, valueChunkLen));
5222
_stringBuilder
.Append('&');
5223
_stringBuilder
.Append(entityName);
5224
_stringBuilder
.Append(';');
5227
valueChunkStartPos =
_stringBuilder
.Length;
5244
int valueChunkLen =
_stringBuilder
.Length - valueChunkStartPos;
5250
textChunk.SetValueNode(XmlNodeType.Text,
_stringBuilder
.ToString(valueChunkStartPos, valueChunkLen));
5339
valueChunkStartPos =
_stringBuilder
.Length;
5352
int valueChunkLen =
_stringBuilder
.Length - valueChunkStartPos;
5358
textChunk.SetValueNode(XmlNodeType.Text,
_stringBuilder
.ToString(valueChunkStartPos, valueChunkLen));
5365
attr.SetValue(
_stringBuilder
.ToString());
5366
_stringBuilder
.Length = 0;
5402
Debug.Assert(
_stringBuilder
.Length == 0);
5433
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
5439
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
5442
Debug.Assert(
_stringBuilder
.Length > 0);
5447
_stringBuilder
.Length = 0;
5451
_curNode.SetValueNode(nodeType,
_stringBuilder
.ToString());
5452
_stringBuilder
.Length = 0;
5474
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
5481
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
5483
} while (!fullValue && orChars <= 0x20 &&
_stringBuilder
.Length < MinWhitespaceLookahedCount);
5486
XmlNodeType nodeType = (
_stringBuilder
.Length < MinWhitespaceLookahedCount) ? GetTextNodeType(orChars) : XmlNodeType.Text;
5490
_stringBuilder
.Length = 0;
5499
_curNode.SetValueNode(nodeType,
_stringBuilder
.ToString());
5500
_stringBuilder
.Length = 0;
5771
Debug.Assert(
_stringBuilder
.Length == 0);
5775
_curNode.CopyTo(_readValueOffset,
_stringBuilder
);
5782
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
5784
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
5786
Debug.Assert(
_stringBuilder
.Length > 0);
5787
_curNode.SetValue(
_stringBuilder
.ToString());
5788
_stringBuilder
.Length = 0;
5900
Debug.Assert(
_stringBuilder
.Length == 0);
5916
EatWhitespaces(
_stringBuilder
);
5919
if (
_stringBuilder
.Length > 0)
5921
_curNode.SetValueNode(nodeType,
_stringBuilder
.ToString());
5922
_stringBuilder
.Length = 0;
6203
Debug.Assert(
_stringBuilder
.Length == 0);
6273
sb =
_stringBuilder
;
6274
Debug.Assert(
_stringBuilder
.Length == 0);
6289
_curNode.SetValue(
_stringBuilder
.ToString());
6290
_stringBuilder
.Length = 0;
6477
Debug.Assert(
_stringBuilder
.Length == 0);
6487
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
6490
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
6491
_curNode.SetValueNode(type,
_stringBuilder
.ToString());
6492
_stringBuilder
.Length = 0;
8579
Debug.Assert(
_stringBuilder
.Length == 0);
8615
_stringBuilder
.Append(chars, _ps.charPos, pos - _ps.charPos);
8633
if (
_stringBuilder
.Length == 0)
8683
_stringBuilder
.Append(chars, _ps.charPos, pos - _ps.charPos);
8690
if (
_stringBuilder
.Length > 0)
8715
_stringBuilder
.Append(chars, _ps.charPos, pos - _ps.charPos);
8719
_curNode.SetValueNode(XmlNodeType.Text,
_stringBuilder
.ToString());
8720
_stringBuilder
.Length = 0;
System\Xml\Core\XmlTextReaderImplAsync.cs (59)
1193
Debug.Assert(
_stringBuilder
.Length == 0 || isTextDecl);
1194
StringBuilder sb = isTextDecl ? new StringBuilder() :
_stringBuilder
;
2613
Debug.Assert(
_stringBuilder
.Length == 0);
2625
_stringBuilder
.Append(chars, _ps.charPos, pos - _ps.charPos);
2643
_stringBuilder
.Append((char)0x20); // CDATA normalization of 0xA
2653
_stringBuilder
.Append(_ps.eolNormalized ? "\u0020\u0020" : "\u0020"); // CDATA normalization of 0xD 0xA
2662
_stringBuilder
.Append((char)0x20); // CDATA normalization of 0xD and 0xD 0xA
2677
_stringBuilder
.Append((char)0x20); // CDATA normalization of 0x9
2694
_stringBuilder
.Append(chars, _ps.charPos, pos - _ps.charPos);
2716
int valueChunkLen =
_stringBuilder
.Length - valueChunkStartPos;
2722
textChunk.SetValueNode(XmlNodeType.Text,
_stringBuilder
.ToString(valueChunkStartPos, valueChunkLen));
2738
_stringBuilder
.Append('&');
2739
_stringBuilder
.Append(entityName);
2740
_stringBuilder
.Append(';');
2743
valueChunkStartPos =
_stringBuilder
.Length;
2760
int valueChunkLen =
_stringBuilder
.Length - valueChunkStartPos;
2766
textChunk.SetValueNode(XmlNodeType.Text,
_stringBuilder
.ToString(valueChunkStartPos, valueChunkLen));
2855
valueChunkStartPos =
_stringBuilder
.Length;
2869
int valueChunkLen =
_stringBuilder
.Length - valueChunkStartPos;
2875
textChunk.SetValueNode(XmlNodeType.Text,
_stringBuilder
.ToString(valueChunkStartPos, valueChunkLen));
2882
attr.SetValue(
_stringBuilder
.ToString());
2883
_stringBuilder
.Length = 0;
2899
Debug.Assert(
_stringBuilder
.Length == 0);
2967
Debug.Assert(
_stringBuilder
.Length == 0);
3004
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
3015
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
3018
Debug.Assert(
_stringBuilder
.Length > 0);
3023
_stringBuilder
.Length = 0;
3027
_curNode.SetValueNode(nodeType,
_stringBuilder
.ToString());
3028
_stringBuilder
.Length = 0;
3049
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
3062
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
3064
} while (!fullValue && orChars <= 0x20 &&
_stringBuilder
.Length < MinWhitespaceLookahedCount);
3067
XmlNodeType nodeType = (
_stringBuilder
.Length < MinWhitespaceLookahedCount) ? GetTextNodeType(orChars) : XmlNodeType.Text;
3071
_stringBuilder
.Length = 0;
3084
_curNode.SetValueNode(nodeType,
_stringBuilder
.ToString());
3085
_stringBuilder
.Length = 0;
3529
Debug.Assert(
_stringBuilder
.Length == 0);
3533
_curNode.CopyTo(_readValueOffset,
_stringBuilder
);
3546
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
3553
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
3555
Debug.Assert(
_stringBuilder
.Length > 0);
3556
_curNode.SetValue(
_stringBuilder
.ToString());
3557
_stringBuilder
.Length = 0;
3677
Debug.Assert(
_stringBuilder
.Length == 0);
3692
await EatWhitespacesAsync(
_stringBuilder
).ConfigureAwait(false);
3695
if (
_stringBuilder
.Length > 0)
3697
_curNode.SetValueNode(nodeType,
_stringBuilder
.ToString());
3698
_stringBuilder
.Length = 0;
3908
Debug.Assert(
_stringBuilder
.Length == 0);
3987
sb =
_stringBuilder
;
3988
Debug.Assert(
_stringBuilder
.Length == 0);
4010
_curNode.SetValue(
_stringBuilder
.ToString());
4011
_stringBuilder
.Length = 0;
4202
Debug.Assert(
_stringBuilder
.Length == 0);
4218
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
4225
_stringBuilder
.Append(_ps.chars, startPos, endPos - startPos);
4226
_curNode.SetValueNode(type,
_stringBuilder
.ToString());
4227
_stringBuilder
.Length = 0;