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)
2166Debug.Assert(_stringBuilder.Length == 0); 2178_stringBuilder.Append(_ps.chars, _incReadLeftStartPos, _incReadLeftEndPos - _incReadLeftStartPos); 2191_stringBuilder.Append(_ps.chars, _ps.charPos, _ps.charsUsed - _ps.charPos); 2197string remainer = _stringBuilder.ToString(); 2198_stringBuilder.Length = 0; 3609Debug.Assert(_stringBuilder.Length == 0 || isTextDecl); 3610StringBuilder sb = isTextDecl ? new StringBuilder() : _stringBuilder; 4267_stringBuilder.Length = 0; 4275_stringBuilder.Append(el.GetNameWPrefix(_nameTable)); 4278_stringBuilder.Append(", "); 4282_stringBuilder.Append('.'); 4286Throw(_ps.charsUsed, SR.Xml_UnexpectedEOFInElementContent, _stringBuilder.ToString()); 5103Debug.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); 5200int valueChunkLen = _stringBuilder.Length - valueChunkStartPos; 5206textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 5222_stringBuilder.Append('&'); 5223_stringBuilder.Append(entityName); 5224_stringBuilder.Append(';'); 5227valueChunkStartPos = _stringBuilder.Length; 5244int valueChunkLen = _stringBuilder.Length - valueChunkStartPos; 5250textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 5339valueChunkStartPos = _stringBuilder.Length; 5352int valueChunkLen = _stringBuilder.Length - valueChunkStartPos; 5358textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 5365attr.SetValue(_stringBuilder.ToString()); 5366_stringBuilder.Length = 0; 5402Debug.Assert(_stringBuilder.Length == 0); 5433_stringBuilder.Append(_ps.chars, startPos, endPos - startPos); 5439_stringBuilder.Append(_ps.chars, startPos, endPos - startPos); 5442Debug.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); 5486XmlNodeType nodeType = (_stringBuilder.Length < MinWhitespaceLookahedCount) ? GetTextNodeType(orChars) : XmlNodeType.Text; 5490_stringBuilder.Length = 0; 5499_curNode.SetValueNode(nodeType, _stringBuilder.ToString()); 5500_stringBuilder.Length = 0; 5771Debug.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); 5786Debug.Assert(_stringBuilder.Length > 0); 5787_curNode.SetValue(_stringBuilder.ToString()); 5788_stringBuilder.Length = 0; 5900Debug.Assert(_stringBuilder.Length == 0); 5916EatWhitespaces(_stringBuilder); 5919if (_stringBuilder.Length > 0) 5921_curNode.SetValueNode(nodeType, _stringBuilder.ToString()); 5922_stringBuilder.Length = 0; 6203Debug.Assert(_stringBuilder.Length == 0); 6273sb = _stringBuilder; 6274Debug.Assert(_stringBuilder.Length == 0); 6289_curNode.SetValue(_stringBuilder.ToString()); 6290_stringBuilder.Length = 0; 6477Debug.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; 8579Debug.Assert(_stringBuilder.Length == 0); 8615_stringBuilder.Append(chars, _ps.charPos, pos - _ps.charPos); 8633if (_stringBuilder.Length == 0) 8683_stringBuilder.Append(chars, _ps.charPos, pos - _ps.charPos); 8690if (_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)
1193Debug.Assert(_stringBuilder.Length == 0 || isTextDecl); 1194StringBuilder sb = isTextDecl ? new StringBuilder() : _stringBuilder; 2613Debug.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); 2716int valueChunkLen = _stringBuilder.Length - valueChunkStartPos; 2722textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 2738_stringBuilder.Append('&'); 2739_stringBuilder.Append(entityName); 2740_stringBuilder.Append(';'); 2743valueChunkStartPos = _stringBuilder.Length; 2760int valueChunkLen = _stringBuilder.Length - valueChunkStartPos; 2766textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 2855valueChunkStartPos = _stringBuilder.Length; 2869int valueChunkLen = _stringBuilder.Length - valueChunkStartPos; 2875textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 2882attr.SetValue(_stringBuilder.ToString()); 2883_stringBuilder.Length = 0; 2899Debug.Assert(_stringBuilder.Length == 0); 2967Debug.Assert(_stringBuilder.Length == 0); 3004_stringBuilder.Append(_ps.chars, startPos, endPos - startPos); 3015_stringBuilder.Append(_ps.chars, startPos, endPos - startPos); 3018Debug.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); 3067XmlNodeType nodeType = (_stringBuilder.Length < MinWhitespaceLookahedCount) ? GetTextNodeType(orChars) : XmlNodeType.Text; 3071_stringBuilder.Length = 0; 3084_curNode.SetValueNode(nodeType, _stringBuilder.ToString()); 3085_stringBuilder.Length = 0; 3529Debug.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); 3555Debug.Assert(_stringBuilder.Length > 0); 3556_curNode.SetValue(_stringBuilder.ToString()); 3557_stringBuilder.Length = 0; 3677Debug.Assert(_stringBuilder.Length == 0); 3692await EatWhitespacesAsync(_stringBuilder).ConfigureAwait(false); 3695if (_stringBuilder.Length > 0) 3697_curNode.SetValueNode(nodeType, _stringBuilder.ToString()); 3698_stringBuilder.Length = 0; 3908Debug.Assert(_stringBuilder.Length == 0); 3987sb = _stringBuilder; 3988Debug.Assert(_stringBuilder.Length == 0); 4010_curNode.SetValue(_stringBuilder.ToString()); 4011_stringBuilder.Length = 0; 4202Debug.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;