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)
70
encoding
= 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
3194
Debug.Assert(_ps.
encoding
!= null);
3196
ReadOnlySpan<byte> preamble = _ps.
encoding
.Preamble;
3206
Debug.Assert(_ps.
encoding
!= null);
3207
if ((newEncoding.WebName != _ps.
encoding
.WebName || _ps.decoder is SafeAsciiDecoder) && !_afterResetState)
3221
Debug.Assert(_ps.
encoding
!= null);
3226
return _ps.
encoding
;
3234
if (_ps.
encoding
.WebName != "utf-16BE" &&
3235
_ps.
encoding
.WebName != "utf-16" &&
3247
return _ps.
encoding
;
3275
if (_afterResetState && _ps.
encoding
.WebName != newEncoding.WebName)
3314
Debug.Assert(_ps.
encoding
!= null);
3316
_ps.bytePos += _ps.
encoding
.GetByteCount(_ps.chars, 0, _ps.charPos);
3653
Debug.Assert(_ps.
encoding
!= null);
3654
string encodingName = _ps.
encoding
.WebName;
3656
encodingName != "utf-16BE" && !(_ps.
encoding
is Ucs4Encoding))
3658
Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.
encoding
.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16");
3871
Debug.Assert(_ps.
encoding
!= null);
3872
string encodingName = _ps.
encoding
.WebName;
3874
encodingName != "utf-16BE" && !(_ps.
encoding
is Ucs4Encoding))
3876
Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.
encoding
.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16");
6017
_reportedEncoding = _ps.
encoding
;
6155
_reportedEncoding = _ps.
encoding
;
6165
_reportedEncoding = _ps.
encoding
;
8018
Encoding? enc = _ps.
encoding
;
8035
Encoding? 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
;
1001
if ((newEncoding.WebName != _ps.
encoding
!.WebName || _ps.decoder is SafeAsciiDecoder) && !_afterResetState)
1238
string encodingName = _ps.
encoding
!.WebName;
1240
encodingName != "utf-16BE" && !(_ps.
encoding
is Ucs4Encoding))
1242
Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.
encoding
.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16");
1451
string encodingName = _ps.
encoding
!.WebName;
1453
encodingName != "utf-16BE" && !(_ps.
encoding
is Ucs4Encoding))
1455
Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.
encoding
.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16");
3801
_reportedEncoding = _ps.
encoding
;
5225
Encoding? enc = _ps.
encoding
;