6 writes to encoding
System.Private.Xml (6)
System\Xml\Core\XmlTextReaderImpl.cs (4)
2936_ps.encoding = Encoding.Unicode; 2960_ps.encoding = originalEncoding; 3177_ps.encoding = Encoding.UTF8; 3182_ps.encoding = encoding;
System\Xml\Core\XmlTextReaderImplAsync.cs (1)
967_ps.encoding = Encoding.Unicode;
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
70encoding = null;
55 references to encoding
System.Private.Xml (55)
System\Xml\Core\XmlTextReaderImpl.cs (39)
476_reportedEncoding = _ps.encoding; 499_reportedEncoding = _ps.encoding; 523_reportedEncoding = _ps.encoding; 544_reportedEncoding = _ps.encoding; 663_reportedEncoding = _ps.encoding; 743_reportedEncoding = _ps.encoding; 796_reportedEncoding = _ps.encoding; 815_reportedEncoding = _ps.encoding; 1246_reportedEncoding = _ps.encoding; 1249_reportedEncoding = _ps.encoding; 1286_reportedEncoding = _ps.encoding; 1294_reportedEncoding = _ps.encoding; 3083_reportedEncoding = _ps.encoding; 3183_ps.decoder = _ps.encoding.WebName switch // Encoding.Codepage is not supported in Silverlight 3194Debug.Assert(_ps.encoding != null); 3196ReadOnlySpan<byte> preamble = _ps.encoding.Preamble; 3206Debug.Assert(_ps.encoding != null); 3207if ((newEncoding.WebName != _ps.encoding.WebName || _ps.decoder is SafeAsciiDecoder) && !_afterResetState) 3221Debug.Assert(_ps.encoding != null); 3226return _ps.encoding; 3234if (_ps.encoding.WebName != "utf-16BE" && 3235_ps.encoding.WebName != "utf-16" && 3247return _ps.encoding; 3275if (_afterResetState && _ps.encoding.WebName != newEncoding.WebName) 3314Debug.Assert(_ps.encoding != null); 3316_ps.bytePos += _ps.encoding.GetByteCount(_ps.chars, 0, _ps.charPos); 3653Debug.Assert(_ps.encoding != null); 3654string encodingName = _ps.encoding.WebName; 3656encodingName != "utf-16BE" && !(_ps.encoding is Ucs4Encoding)) 3658Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.encoding.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16"); 3871Debug.Assert(_ps.encoding != null); 3872string encodingName = _ps.encoding.WebName; 3874encodingName != "utf-16BE" && !(_ps.encoding is Ucs4Encoding)) 3876Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.encoding.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16"); 6017_reportedEncoding = _ps.encoding; 6155_reportedEncoding = _ps.encoding; 6165_reportedEncoding = _ps.encoding; 8018Encoding? enc = _ps.encoding; 8035Encoding? enc = _ps.encoding;
System\Xml\Core\XmlTextReaderImplAsync.cs (16)
97_reportedEncoding = _ps.encoding; 128_reportedEncoding = _ps.encoding; 143_reportedEncoding = _ps.encoding; 219_reportedEncoding = _ps.encoding; 227_reportedEncoding = _ps.encoding; 295_reportedEncoding = _ps.encoding; 300_reportedEncoding = _ps.encoding; 1001if ((newEncoding.WebName != _ps.encoding!.WebName || _ps.decoder is SafeAsciiDecoder) && !_afterResetState) 1238string encodingName = _ps.encoding!.WebName; 1240encodingName != "utf-16BE" && !(_ps.encoding is Ucs4Encoding)) 1242Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.encoding.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16"); 1451string encodingName = _ps.encoding!.WebName; 1453encodingName != "utf-16BE" && !(_ps.encoding is Ucs4Encoding)) 1455Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.encoding.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16"); 3801_reportedEncoding = _ps.encoding; 5225Encoding? enc = _ps.encoding;