2 writes to stringBuilder
System.Xml (2)
System\Xml\Core\XmlTextReaderImpl.cs (2)
374
stringBuilder
= new BufferBuilder();
437
stringBuilder
= new BufferBuilder();
135 references to stringBuilder
System.Xml (135)
System\Xml\Core\XmlTextReaderImpl.cs (76)
2027
Debug.Assert(
stringBuilder
.Length == 0 );
2037
stringBuilder
.Append( ps.chars, incReadLeftStartPos, incReadLeftEndPos - incReadLeftStartPos );
2048
stringBuilder
.Append( ps.chars, ps.charPos, ps.charsUsed - ps.charPos );
2054
string remainer =
stringBuilder
.ToString();
2055
stringBuilder
.Length = 0;
3295
Debug.Assert(
stringBuilder
.Length == 0 || isTextDecl );
3296
BufferBuilder sb = isTextDecl ? new BufferBuilder() :
stringBuilder
;
3877
stringBuilder
.Length = 0;
3883
stringBuilder
.Append( el.GetNameWPrefix( nameTable ) );
3885
stringBuilder
.Append( ", " );
3888
stringBuilder
.Append( "." );
3891
Throw ( ps.charsUsed, Res.Xml_UnexpectedEOFInElementContent,
stringBuilder
.ToString() );
4661
Debug.Assert(
stringBuilder
.Length == 0 );
4678
stringBuilder
.Append( chars, ps.charPos, pos - ps.charPos );
4692
stringBuilder
.Append( (char)0x20 ); // CDATA normalization of 0xA
4700
stringBuilder
.Append( ps.eolNormalized ? "\u0020\u0020" : "\u0020" ); // CDATA normalization of 0xD 0xA
4707
stringBuilder
.Append( (char)0x20 ); // CDATA normalization of 0xD and 0xD 0xA
4720
stringBuilder
.Append( (char)0x20 ); // CDATA normalization of 0x9
4736
stringBuilder
.Append( chars, ps.charPos, pos - ps.charPos );
4753
int valueChunkLen =
stringBuilder
.Length - valueChunkStartPos;
4758
textChunk.SetValueNode( XmlNodeType.Text,
stringBuilder
.ToString( valueChunkStartPos, valueChunkLen ) );
4774
stringBuilder
.Append( '&' );
4775
stringBuilder
.Append( entityName );
4776
stringBuilder
.Append( ';' );
4779
valueChunkStartPos =
stringBuilder
.Length;
4795
int valueChunkLen =
stringBuilder
.Length - valueChunkStartPos;
4800
textChunk.SetValueNode( XmlNodeType.Text,
stringBuilder
.ToString( valueChunkStartPos, valueChunkLen ) );
4878
valueChunkStartPos =
stringBuilder
.Length;
4892
int valueChunkLen =
stringBuilder
.Length - valueChunkStartPos;
4897
textChunk.SetValueNode( XmlNodeType.Text,
stringBuilder
.ToString( valueChunkStartPos, valueChunkLen ) );
4905
attr.SetValue(
stringBuilder
.ToString() );
4906
stringBuilder
.Length = 0;
4939
Debug.Assert(
stringBuilder
.Length == 0 );
4960
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
4965
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
4968
Debug.Assert(
stringBuilder
.Length > 0 );
4972
stringBuilder
.Length = 0;
4976
curNode.SetValueNode( nodeType,
stringBuilder
.ToString() );
4977
stringBuilder
.Length = 0;
4995
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
5000
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
5002
} while ( !fullValue && orChars <= 0x20 &&
stringBuilder
.Length < MinWhitespaceLookahedCount );
5005
XmlNodeType nodeType = (
stringBuilder
.Length < MinWhitespaceLookahedCount ) ? GetTextNodeType( orChars ) : XmlNodeType.Text;
5008
stringBuilder
.Length = 0;
5015
curNode.SetValueNode( nodeType,
stringBuilder
.ToString() );
5016
stringBuilder
.Length = 0;
5262
Debug.Assert(
stringBuilder
.Length == 0 );
5266
curNode.CopyTo( readValueOffset,
stringBuilder
);
5272
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
5274
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
5276
Debug.Assert(
stringBuilder
.Length > 0 );
5277
curNode.SetValue(
stringBuilder
.ToString() );
5278
stringBuilder
.Length = 0;
5374
Debug.Assert(
stringBuilder
.Length == 0 );
5386
EatWhitespaces(
stringBuilder
);
5388
if (
stringBuilder
.Length > 0 ) {
5389
curNode.SetValueNode( nodeType,
stringBuilder
.ToString() );
5390
stringBuilder
.Length = 0;
5648
Debug.Assert(
stringBuilder
.Length == 0 );
5702
sb =
stringBuilder
;
5703
Debug.Assert(
stringBuilder
.Length == 0 );
5715
curNode.SetValue(
stringBuilder
.ToString() );
5716
stringBuilder
.Length = 0;
5880
Debug.Assert(
stringBuilder
.Length == 0 );
5886
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
5888
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
5889
curNode.SetValueNode( type,
stringBuilder
.ToString() );
5890
stringBuilder
.Length = 0;
7699
Debug.Assert(
stringBuilder
.Length == 0 );
7733
stringBuilder
.Append( chars, ps.charPos, pos - ps.charPos );
7748
if (
stringBuilder
.Length == 0 ) {
7788
stringBuilder
.Append( chars, ps.charPos, pos - ps.charPos );
7793
if (
stringBuilder
.Length > 0 ) {
7813
stringBuilder
.Append( chars, ps.charPos, pos - ps.charPos );
7816
curNode.SetValueNode( XmlNodeType.Text,
stringBuilder
.ToString() );
7817
stringBuilder
.Length = 0;
System\Xml\Core\XmlTextReaderImplAsync.cs (59)
1127
Debug.Assert(
stringBuilder
.Length == 0 || isTextDecl );
1128
BufferBuilder sb = isTextDecl ? new BufferBuilder() :
stringBuilder
;
2443
Debug.Assert(
stringBuilder
.Length == 0 );
2460
stringBuilder
.Append( chars, ps.charPos, pos - ps.charPos );
2474
stringBuilder
.Append( (char)0x20 ); // CDATA normalization of 0xA
2482
stringBuilder
.Append( ps.eolNormalized ? "\u0020\u0020" : "\u0020" ); // CDATA normalization of 0xD 0xA
2489
stringBuilder
.Append( (char)0x20 ); // CDATA normalization of 0xD and 0xD 0xA
2502
stringBuilder
.Append( (char)0x20 ); // CDATA normalization of 0x9
2518
stringBuilder
.Append( chars, ps.charPos, pos - ps.charPos );
2540
int valueChunkLen =
stringBuilder
.Length - valueChunkStartPos;
2545
textChunk.SetValueNode( XmlNodeType.Text,
stringBuilder
.ToString( valueChunkStartPos, valueChunkLen ) );
2561
stringBuilder
.Append( '&' );
2562
stringBuilder
.Append( entityName );
2563
stringBuilder
.Append( ';' );
2566
valueChunkStartPos =
stringBuilder
.Length;
2582
int valueChunkLen =
stringBuilder
.Length - valueChunkStartPos;
2587
textChunk.SetValueNode( XmlNodeType.Text,
stringBuilder
.ToString( valueChunkStartPos, valueChunkLen ) );
2665
valueChunkStartPos =
stringBuilder
.Length;
2679
int valueChunkLen =
stringBuilder
.Length - valueChunkStartPos;
2684
textChunk.SetValueNode( XmlNodeType.Text,
stringBuilder
.ToString( valueChunkStartPos, valueChunkLen ) );
2692
attr.SetValue(
stringBuilder
.ToString() );
2693
stringBuilder
.Length = 0;
2707
Debug.Assert(
stringBuilder
.Length == 0);
2771
Debug.Assert(
stringBuilder
.Length == 0 );
2803
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
2814
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
2817
Debug.Assert(
stringBuilder
.Length > 0 );
2821
stringBuilder
.Length = 0;
2825
curNode.SetValueNode( nodeType,
stringBuilder
.ToString() );
2826
stringBuilder
.Length = 0;
2844
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
2856
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
2858
} while ( !fullValue && orChars <= 0x20 &&
stringBuilder
.Length < MinWhitespaceLookahedCount );
2861
XmlNodeType nodeType = (
stringBuilder
.Length < MinWhitespaceLookahedCount ) ? GetTextNodeType( orChars ) : XmlNodeType.Text;
2864
stringBuilder
.Length = 0;
2880
curNode.SetValueNode( nodeType,
stringBuilder
.ToString() );
2881
stringBuilder
.Length = 0;
3287
Debug.Assert(
stringBuilder
.Length == 0 );
3291
curNode.CopyTo( readValueOffset,
stringBuilder
);
3304
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
3312
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
3314
Debug.Assert(
stringBuilder
.Length > 0 );
3315
curNode.SetValue(
stringBuilder
.ToString() );
3316
stringBuilder
.Length = 0;
3424
Debug.Assert(
stringBuilder
.Length == 0 );
3436
await EatWhitespacesAsync(
stringBuilder
).ConfigureAwait(false);
3438
if (
stringBuilder
.Length > 0 ) {
3439
curNode.SetValueNode( nodeType,
stringBuilder
.ToString() );
3440
stringBuilder
.Length = 0;
3639
Debug.Assert(
stringBuilder
.Length == 0 );
3707
sb =
stringBuilder
;
3708
Debug.Assert(
stringBuilder
.Length == 0 );
3728
curNode.SetValue(
stringBuilder
.ToString() );
3729
stringBuilder
.Length = 0;
3901
Debug.Assert(
stringBuilder
.Length == 0 );
3916
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
3924
stringBuilder
.Append( ps.chars, startPos, endPos - startPos );
3925
curNode.SetValueNode( type,
stringBuilder
.ToString() );
3926
stringBuilder
.Length = 0;