1 write to reader
System.Private.Xml (1)
System\Xml\Core\XmlWrappingReader.cs (1)
26
this.
reader
= baseReader;
272 references to reader
System.Private.Xml (272)
System\Xml\Core\XmlCharCheckingReader.cs (34)
71
XmlReaderSettings? settings =
reader
.Settings;
112
return base.
reader
.MoveToAttribute(name);
121
return base.
reader
.MoveToAttribute(name, ns);
130
base.
reader
.MoveToAttribute(i);
139
return base.
reader
.MoveToFirstAttribute();
148
return base.
reader
.MoveToNextAttribute();
157
return base.
reader
.MoveToElement();
166
if (base.
reader
.ReadState == ReadState.Initial)
181
if (!base.
reader
.Read())
192
XmlNodeType nodeType = base.
reader
.NodeType;
237
ValidateQName(base.
reader
.Prefix, base.
reader
.LocalName);
240
if (base.
reader
.MoveToFirstAttribute())
244
ValidateQName(base.
reader
.Prefix, base.
reader
.LocalName);
245
CheckCharacters(base.
reader
.Value);
246
} while (base.
reader
.MoveToNextAttribute());
248
base.
reader
.MoveToElement();
257
CheckCharacters(base.
reader
.Value);
265
ValidateQName(base.
reader
.Name);
276
ValidateQName(base.
reader
.Name);
277
CheckCharacters(base.
reader
.Value);
288
CheckCharacters(base.
reader
.Value);
303
ValidateQName(base.
reader
.Name);
304
CheckCharacters(base.
reader
.Value);
307
str = base.
reader
.GetAttribute("SYSTEM");
313
str = base.
reader
.GetAttribute("PUBLIC");
332
CheckWhitespace(base.
reader
.Value);
339
CheckWhitespace(base.
reader
.Value);
346
ValidateQName(base.
reader
.Prefix, base.
reader
.LocalName);
365
return base.
reader
.ReadState == ReadState.Closed ? ReadState.Closed : ReadState.Initial;
371
return base.
reader
.ReadState;
382
return base.
reader
.ReadAttributeValue();
System\Xml\Core\XmlCharCheckingReaderAsync.cs (24)
24
if (base.
reader
.ReadState == ReadState.Initial)
43
if (!await base.
reader
.ReadAsync().ConfigureAwait(false))
54
XmlNodeType nodeType = base.
reader
.NodeType;
99
ValidateQName(base.
reader
.Prefix, base.
reader
.LocalName);
102
if (base.
reader
.MoveToFirstAttribute())
106
ValidateQName(base.
reader
.Prefix, base.
reader
.LocalName);
107
CheckCharacters(base.
reader
.Value);
108
} while (base.
reader
.MoveToNextAttribute());
110
base.
reader
.MoveToElement();
119
CheckCharacters(await base.
reader
.GetValueAsync().ConfigureAwait(false));
127
ValidateQName(base.
reader
.Name);
138
ValidateQName(base.
reader
.Name);
139
CheckCharacters(base.
reader
.Value);
150
CheckCharacters(base.
reader
.Value);
165
ValidateQName(base.
reader
.Name);
166
CheckCharacters(base.
reader
.Value);
168
string? str = base.
reader
.GetAttribute("SYSTEM");
174
str = base.
reader
.GetAttribute("PUBLIC");
193
CheckWhitespace(await base.
reader
.GetValueAsync().ConfigureAwait(false));
200
CheckWhitespace(await base.
reader
.GetValueAsync().ConfigureAwait(false));
207
ValidateQName(base.
reader
.Prefix, base.
reader
.LocalName);
System\Xml\Core\XmlSubtreeReader.cs (115)
119
return _useCurNode ? _curNode.type :
reader
.NodeType;
127
return _useCurNode ? _curNode.name :
reader
.Name;
135
return _useCurNode ? _curNode.localName :
reader
.LocalName;
143
return _useCurNode ? _curNode.namespaceUri :
reader
.NamespaceURI;
151
return _useCurNode ? _curNode.prefix :
reader
.Prefix;
159
return _useCurNode ? _curNode.value :
reader
.Value;
167
int depth =
reader
.Depth - _initialDepth;
187
return
reader
.BaseURI;
195
return
reader
.IsEmptyElement;
211
if (
reader
.ReadState == ReadState.Error)
233
return
reader
.NameTable;
241
return InAttributeActiveState ?
reader
.AttributeCount + _nsAttrCount : 0;
251
string? attr =
reader
.GetAttribute(name);
274
string? attr =
reader
.GetAttribute(name, namespaceURI);
297
int n =
reader
.AttributeCount;
300
return
reader
.GetAttribute(i);
318
if (
reader
.MoveToAttribute(name))
342
if (
reader
.MoveToAttribute(name, ns))
366
int n =
reader
.AttributeCount;
369
reader
.MoveToAttribute(i);
389
if (
reader
.MoveToFirstAttribute())
408
if (_curNsAttr == -1 &&
reader
.MoveToNextAttribute())
432
Debug.Assert(
reader
.NodeType == XmlNodeType.Element);
437
return
reader
.MoveToElement();
449
return
reader
.ReadAttributeValue();
478
reader
.MoveToElement();
479
Debug.Assert(
reader
.Depth >= _initialDepth);
480
if (
reader
.Depth == _initialDepth)
482
if (
reader
.NodeType == XmlNodeType.EndElement ||
483
(
reader
.NodeType == XmlNodeType.Element &&
reader
.IsEmptyElement))
489
Debug.Assert(
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement);
491
if (
reader
.Read())
549
reader
.MoveToElement();
550
Debug.Assert(
reader
.Depth >= _initialDepth);
552
if (
reader
.Depth == _initialDepth &&
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement)
554
reader
.Read();
557
while (
reader
.Depth > _initialDepth &&
reader
.Read())
586
reader
.MoveToElement();
587
Debug.Assert(
reader
.Depth >= _initialDepth);
588
if (
reader
.Depth == _initialDepth)
590
if (
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement)
593
if (
reader
.Read())
595
while (
reader
.NodeType != XmlNodeType.EndElement &&
reader
.Depth > _initialDepth)
597
reader
.Skip();
601
Debug.Assert(
reader
.NodeType == XmlNodeType.EndElement ||
602
reader
.NodeType == XmlNodeType.Element &&
reader
.IsEmptyElement ||
603
reader
.ReadState != ReadState.Interactive);
609
if (
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement)
613
reader
.Skip();
616
Debug.Assert(
reader
.Depth >= _initialDepth);
662
object value =
reader
.ReadContentAsObject();
678
bool value =
reader
.ReadContentAsBoolean();
694
DateTime value =
reader
.ReadContentAsDateTime();
710
double value =
reader
.ReadContentAsDouble();
726
float value =
reader
.ReadContentAsFloat();
742
decimal value =
reader
.ReadContentAsDecimal();
758
int value =
reader
.ReadContentAsInt();
774
long value =
reader
.ReadContentAsLong();
790
string value =
reader
.ReadContentAsString();
806
object value =
reader
.ReadContentAs(returnType, namespaceResolver);
821
return
reader
.CanReadBinaryContent;
844
if (_curNsAttr != -1 &&
reader
.CanReadBinaryContent)
876
return
reader
.ReadContentAsBase64(buffer, index, count);
887
int read =
reader
.ReadContentAsBase64(buffer, index, count);
926
int read =
reader
.ReadContentAsBase64(buffer, index, count);
933
throw new XmlException(SR.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
941
if (
reader
.Depth == _initialDepth)
982
if (_curNsAttr != -1 &&
reader
.CanReadBinaryContent)
1014
return
reader
.ReadContentAsBinHex(buffer, index, count);
1025
int read =
reader
.ReadContentAsBinHex(buffer, index, count);
1063
int read =
reader
.ReadContentAsBinHex(buffer, index, count);
1070
throw new XmlException(SR.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
1078
if (
reader
.Depth == _initialDepth)
1104
return
reader
.CanReadValueChunk;
1121
if (_curNsAttr != -1 &&
reader
.CanReadValueChunk)
1145
return
reader
.ReadValueChunk(buffer, index, count);
1182
if (
reader
is IXmlLineInfo lineInfo)
1197
if (
reader
is IXmlLineInfo lineInfo)
1208
return
reader
is IXmlLineInfo;
1246
switch (
reader
.NodeType)
1251
string prefix =
reader
.Prefix;
1252
string ns =
reader
.NamespaceURI;
1258
if (
reader
.MoveToFirstAttribute())
1262
prefix =
reader
.Prefix;
1263
ns =
reader
.NamespaceURI;
1269
_nsManager.AddNamespace(string.Empty,
reader
.Value);
1274
prefix =
reader
.LocalName;
1275
_nsManager.AddNamespace(prefix,
reader
.Value);
1283
} while (
reader
.MoveToNextAttribute());
1284
reader
.MoveToElement();
1287
if (
reader
.IsEmptyElement)
1326
name =
reader
.NameTable.Add($"{_xmlns}:{prefix}");
1367
reader
.MoveToElement();
1377
throw
reader
.CreateReadElementContentAsException(nameof(ReadElementContentAsBase64));
1391
throw new XmlException(SR.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
1411
while (
reader
.ReadContentAsBase64(bytes, 0, 256) > 0) ;
1415
while (
reader
.ReadContentAsBinHex(bytes, 0, 256) > 0) ;
1420
throw new XmlException(SR.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
1428
if (
reader
.Depth == _initialDepth)
1445
while (
reader
.ReadContentAsBase64(bytes, 0, 256) > 0) ;
1449
while (
reader
.ReadContentAsBinHex(bytes, 0, 256) > 0) ;
1456
if (
reader
.Depth == _initialDepth)
System\Xml\Core\XmlSubtreeReaderAsync.cs (57)
24
return
reader
.GetValueAsync();
41
reader
.MoveToElement();
42
Debug.Assert(
reader
.Depth >= _initialDepth);
43
if (
reader
.Depth == _initialDepth)
45
if (
reader
.NodeType == XmlNodeType.EndElement ||
46
(
reader
.NodeType == XmlNodeType.Element &&
reader
.IsEmptyElement))
52
Debug.Assert(
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement);
54
if (await
reader
.ReadAsync().ConfigureAwait(false))
112
reader
.MoveToElement();
113
Debug.Assert(
reader
.Depth >= _initialDepth);
114
if (
reader
.Depth == _initialDepth)
116
if (
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement)
119
if (await
reader
.ReadAsync().ConfigureAwait(false))
121
while (
reader
.NodeType != XmlNodeType.EndElement &&
reader
.Depth > _initialDepth)
123
await
reader
.SkipAsync().ConfigureAwait(false);
127
Debug.Assert(
reader
.NodeType == XmlNodeType.EndElement ||
128
reader
.NodeType == XmlNodeType.Element &&
reader
.IsEmptyElement ||
129
reader
.ReadState != ReadState.Interactive);
135
if (
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement)
139
await
reader
.SkipAsync().ConfigureAwait(false);
142
Debug.Assert(
reader
.Depth >= _initialDepth);
188
object value = await
reader
.ReadContentAsObjectAsync().ConfigureAwait(false);
204
string value = await
reader
.ReadContentAsStringAsync().ConfigureAwait(false);
220
object value = await
reader
.ReadContentAsAsync(returnType, namespaceResolver).ConfigureAwait(false);
250
if (_curNsAttr != -1 &&
reader
.CanReadBinaryContent)
282
return await
reader
.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false);
293
int read = await
reader
.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false);
332
int read = await
reader
.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false);
339
throw new XmlException(SR.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
347
if (
reader
.Depth == _initialDepth)
388
if (_curNsAttr != -1 &&
reader
.CanReadBinaryContent)
420
return await
reader
.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false);
431
int read = await
reader
.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false);
469
int read = await
reader
.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false);
476
throw new XmlException(SR.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
484
if (
reader
.Depth == _initialDepth)
519
if (_curNsAttr != -1 &&
reader
.CanReadValueChunk)
543
return
reader
.ReadValueChunkAsync(buffer, index, count);
561
throw
reader
.CreateReadElementContentAsException(nameof(ReadElementContentAsBase64));
575
throw new XmlException(SR.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
595
while (await
reader
.ReadContentAsBase64Async(bytes, 0, 256).ConfigureAwait(false) > 0) ;
599
while (await
reader
.ReadContentAsBinHexAsync(bytes, 0, 256).ConfigureAwait(false) > 0) ;
604
throw new XmlException(SR.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
612
if (
reader
.Depth == _initialDepth)
629
while (await
reader
.ReadContentAsBase64Async(bytes, 0, 256).ConfigureAwait(false) > 0) ;
633
while (await
reader
.ReadContentAsBinHexAsync(bytes, 0, 256).ConfigureAwait(false) > 0) ;
640
if (
reader
.Depth == _initialDepth)
System\Xml\Core\XmlWrappingReader.cs (39)
33
public override XmlReaderSettings? Settings { get { return
reader
.Settings; } }
34
public override XmlNodeType NodeType { get { return
reader
.NodeType; } }
35
public override string Name { get { return
reader
.Name; } }
36
public override string LocalName { get { return
reader
.LocalName; } }
37
public override string NamespaceURI { get { return
reader
.NamespaceURI; } }
38
public override string Prefix { get { return
reader
.Prefix; } }
39
public override bool HasValue { get { return
reader
.HasValue; } }
40
public override string Value { get { return
reader
.Value; } }
41
public override int Depth { get { return
reader
.Depth; } }
42
public override string BaseURI { get { return
reader
.BaseURI; } }
43
public override bool IsEmptyElement { get { return
reader
.IsEmptyElement; } }
44
public override bool IsDefault { get { return
reader
.IsDefault; } }
45
public override XmlSpace XmlSpace { get { return
reader
.XmlSpace; } }
46
public override string XmlLang { get { return
reader
.XmlLang; } }
47
public override System.Type ValueType { get { return
reader
.ValueType; } }
48
public override int AttributeCount { get { return
reader
.AttributeCount; } }
49
public override bool EOF { get { return
reader
.EOF; } }
50
public override ReadState ReadState { get { return
reader
.ReadState; } }
51
public override bool HasAttributes { get { return
reader
.HasAttributes; } }
52
public override XmlNameTable NameTable { get { return
reader
.NameTable; } }
53
public override bool CanResolveEntity { get { return
reader
.CanResolveEntity; } }
55
public override IXmlSchemaInfo? SchemaInfo { get { return
reader
.SchemaInfo; } }
56
public override char QuoteChar { get { return
reader
.QuoteChar; } }
60
return
reader
.GetAttribute(name);
65
return
reader
.GetAttribute(name, namespaceURI);
70
return
reader
.GetAttribute(i);
75
return
reader
.MoveToAttribute(name);
80
return
reader
.MoveToAttribute(name, ns);
85
reader
.MoveToAttribute(i);
90
return
reader
.MoveToFirstAttribute();
95
return
reader
.MoveToNextAttribute();
100
return
reader
.MoveToElement();
105
return
reader
.Read();
110
reader
.Close();
115
reader
.Skip();
120
return
reader
.LookupNamespace(prefix);
125
reader
.ResolveEntity();
130
return
reader
.ReadAttributeValue();
164
return
reader
.DtdInfo;
System\Xml\Core\XmlWrappingReaderAsync.cs (3)
17
return
reader
.GetValueAsync();
22
return
reader
.ReadAsync();
27
return
reader
.SkipAsync();