1 write to reader
System.Xml (1)
System\Xml\Core\XmlWrappingReader.cs (1)
30
this.
reader
= baseReader;
272 references to reader
System.Xml (272)
System\Xml\Core\XmlCharCheckingReader.cs (34)
79
XmlReaderSettings settings =
reader
.Settings;
111
return base.
reader
.MoveToAttribute( name );
118
return base.
reader
.MoveToAttribute( name, ns );
125
base.
reader
.MoveToAttribute( i );
132
return base.
reader
.MoveToFirstAttribute();
139
return base.
reader
.MoveToNextAttribute();
146
return base.
reader
.MoveToElement();
153
if ( base.
reader
.ReadState == ReadState.Initial ) {
167
if ( !base.
reader
.Read() ) {
177
XmlNodeType nodeType = base.
reader
.NodeType;
212
ValidateQName( base.
reader
.Prefix, base.
reader
.LocalName );
215
if ( base.
reader
.MoveToFirstAttribute() ) {
217
ValidateQName( base.
reader
.Prefix, base.
reader
.LocalName );
218
CheckCharacters( base.
reader
.Value );
219
} while ( base.
reader
.MoveToNextAttribute() );
221
base.
reader
.MoveToElement();
229
CheckCharacters( base.
reader
.Value );
236
ValidateQName( base.
reader
.Name );
245
ValidateQName( base.
reader
.Name );
246
CheckCharacters( base.
reader
.Value );
255
CheckCharacters( base.
reader
.Value );
267
ValidateQName( base.
reader
.Name );
268
CheckCharacters( base.
reader
.Value );
271
str = base.
reader
.GetAttribute( "SYSTEM" );
276
str = base.
reader
.GetAttribute( "PUBLIC" );
291
CheckWhitespace( base.
reader
.Value );
297
CheckWhitespace( base.
reader
.Value );
303
ValidateQName( base.
reader
.Prefix, base.
reader
.LocalName );
319
return base.
reader
.ReadState == ReadState.Closed ? ReadState.Closed : ReadState.Initial;
325
return base.
reader
.ReadState;
334
return base.
reader
.ReadAttributeValue();
System\Xml\Core\XmlCharCheckingReaderAsync.cs (24)
21
if ( base.
reader
.ReadState == ReadState.Initial ) {
35
if ( !await base.
reader
.ReadAsync().ConfigureAwait(false) ) {
45
XmlNodeType nodeType = base.
reader
.NodeType;
80
ValidateQName( base.
reader
.Prefix, base.
reader
.LocalName );
83
if ( base.
reader
.MoveToFirstAttribute() ) {
85
ValidateQName( base.
reader
.Prefix, base.
reader
.LocalName );
86
CheckCharacters( base.
reader
.Value );
87
} while ( base.
reader
.MoveToNextAttribute() );
89
base.
reader
.MoveToElement();
97
CheckCharacters( await base.
reader
.GetValueAsync().ConfigureAwait(false) );
104
ValidateQName( base.
reader
.Name );
113
ValidateQName( base.
reader
.Name );
114
CheckCharacters( base.
reader
.Value );
123
CheckCharacters( base.
reader
.Value );
135
ValidateQName( base.
reader
.Name );
136
CheckCharacters( base.
reader
.Value );
139
str = base.
reader
.GetAttribute( "SYSTEM" );
144
str = base.
reader
.GetAttribute( "PUBLIC" );
159
CheckWhitespace( await base.
reader
.GetValueAsync().ConfigureAwait(false) );
165
CheckWhitespace( await base.
reader
.GetValueAsync().ConfigureAwait(false) );
171
ValidateQName( base.
reader
.Prefix, base.
reader
.LocalName );
System\Xml\Core\XmlSubtreeReader.cs (115)
112
return ( useCurNode ) ? curNode.type :
reader
.NodeType;
118
return ( useCurNode ) ? curNode.name :
reader
.Name;
124
return ( useCurNode ) ? curNode.localName :
reader
.LocalName;
130
return ( useCurNode ) ? curNode.namespaceUri :
reader
.NamespaceURI;
136
return ( useCurNode ) ? curNode.prefix :
reader
.Prefix;
142
return ( useCurNode ) ? curNode.value :
reader
.Value;
148
int depth =
reader
.Depth - initialDepth;
163
return
reader
.BaseURI;
169
return
reader
.IsEmptyElement;
181
if (
reader
.ReadState == ReadState.Error ) {
197
return
reader
.NameTable;
203
return InAttributeActiveState ?
reader
.AttributeCount + nsAttrCount : 0;
211
string attr =
reader
.GetAttribute( name );
227
string attr =
reader
.GetAttribute( name, namespaceURI );
243
int n =
reader
.AttributeCount;
245
return
reader
.GetAttribute( i );
259
if (
reader
.MoveToAttribute( name ) ) {
277
if (
reader
.MoveToAttribute( name, ns ) ) {
295
int n =
reader
.AttributeCount;
297
reader
.MoveToAttribute( i );
313
if (
reader
.MoveToFirstAttribute() ) {
328
if ( curNsAttr == -1 &&
reader
.MoveToNextAttribute() ) {
347
Debug.Assert(
reader
.NodeType == XmlNodeType.Element);
351
return
reader
.MoveToElement();
360
return
reader
.ReadAttributeValue();
385
reader
.MoveToElement();
386
Debug.Assert(
reader
.Depth >= initialDepth );
387
if (
reader
.Depth == initialDepth ) {
388
if (
reader
.NodeType == XmlNodeType.EndElement ||
389
(
reader
.NodeType == XmlNodeType.Element &&
reader
.IsEmptyElement ) ) {
394
Debug.Assert(
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement );
396
if (
reader
.Read() ) {
446
reader
.MoveToElement();
447
Debug.Assert(
reader
.Depth >= initialDepth );
449
if (
reader
.Depth == initialDepth &&
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement) {
450
reader
.Read();
453
while (
reader
.Depth > initialDepth &&
reader
.Read()) {
477
reader
.MoveToElement();
478
Debug.Assert(
reader
.Depth >= initialDepth );
479
if (
reader
.Depth == initialDepth ) {
480
if (
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement ) {
482
if (
reader
.Read() ) {
483
while (
reader
.NodeType != XmlNodeType.EndElement &&
reader
.Depth > initialDepth ) {
484
reader
.Skip();
488
Debug.Assert(
reader
.NodeType == XmlNodeType.EndElement ||
489
reader
.NodeType == XmlNodeType.Element &&
reader
.IsEmptyElement ||
490
reader
.ReadState != ReadState.Interactive );
496
if (
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement ) {
499
reader
.Skip();
502
Debug.Assert(
reader
.Depth >= initialDepth );
544
object value =
reader
.ReadContentAsObject();
557
bool value =
reader
.ReadContentAsBoolean();
570
DateTime value =
reader
.ReadContentAsDateTime();
583
double value =
reader
.ReadContentAsDouble();
596
float value =
reader
.ReadContentAsFloat();
609
decimal value =
reader
.ReadContentAsDecimal();
622
int value =
reader
.ReadContentAsInt();
635
long value =
reader
.ReadContentAsLong();
648
string value =
reader
.ReadContentAsString();
661
object value =
reader
.ReadContentAs( returnType, namespaceResolver );
673
return
reader
.CanReadBinaryContent;
693
if ( curNsAttr != -1 &&
reader
.CanReadBinaryContent ) {
717
return
reader
.ReadContentAsBase64( buffer, index, count );
728
int read =
reader
.ReadContentAsBase64( buffer, index, count );
763
int read =
reader
.ReadContentAsBase64( buffer, index, count );
768
throw new XmlException(Res.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
776
if (
reader
.Depth == initialDepth ) {
812
if (curNsAttr != -1 &&
reader
.CanReadBinaryContent) {
835
return
reader
.ReadContentAsBinHex( buffer, index, count );
846
int read =
reader
.ReadContentAsBinHex( buffer, index, count );
880
int read =
reader
.ReadContentAsBinHex( buffer, index, count );
885
throw new XmlException(Res.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
893
if (
reader
.Depth == initialDepth ) {
915
return
reader
.CanReadValueChunk;
930
if (curNsAttr != -1 &&
reader
.CanReadValueChunk) {
951
return
reader
.ReadValueChunk( buffer, index, count );
983
IXmlLineInfo lineInfo =
reader
as IXmlLineInfo;
995
IXmlLineInfo lineInfo =
reader
as IXmlLineInfo;
1005
return
reader
is IXmlLineInfo;
1036
switch (
reader
.NodeType ) {
1040
string prefix =
reader
.Prefix;
1041
string ns =
reader
.NamespaceURI;
1046
if (
reader
.MoveToFirstAttribute() ) {
1048
prefix =
reader
.Prefix;
1049
ns =
reader
.NamespaceURI;
1053
nsManager.AddNamespace( string.Empty,
reader
.Value );
1057
prefix =
reader
.LocalName;
1058
nsManager.AddNamespace( prefix,
reader
.Value );
1065
} while (
reader
.MoveToNextAttribute() );
1066
reader
.MoveToElement();
1069
if (
reader
.IsEmptyElement ) {
1099
nsAttributes[index].Set( XmlNodeType.Attribute, prefix, xmlns,
reader
.NameTable.Add( string.Concat( xmlns, ":", prefix ) ), xmlnsUri, ns );
1126
reader
.MoveToElement();
1134
throw
reader
.CreateReadElementContentAsException( "ReadElementContentAsBase64" );
1146
throw new XmlException(Res.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
1164
while (
reader
.ReadContentAsBase64( bytes, 0, 256 ) > 0 ) ;
1167
while (
reader
.ReadContentAsBinHex( bytes, 0, 256 ) > 0 ) ;
1171
throw new XmlException(Res.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
1179
if (
reader
.Depth == initialDepth ) {
1193
while (
reader
.ReadContentAsBase64( bytes, 0, 256 ) > 0 ) ;
1196
while (
reader
.ReadContentAsBinHex( bytes, 0, 256 ) > 0 ) ;
1203
if (
reader
.Depth == initialDepth ) {
System\Xml\Core\XmlSubtreeReaderAsync.cs (57)
20
return
reader
.GetValueAsync();
35
reader
.MoveToElement();
36
Debug.Assert(
reader
.Depth >= initialDepth );
37
if (
reader
.Depth == initialDepth ) {
38
if (
reader
.NodeType == XmlNodeType.EndElement ||
39
(
reader
.NodeType == XmlNodeType.Element &&
reader
.IsEmptyElement ) ) {
44
Debug.Assert(
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement );
46
if ( await
reader
.ReadAsync().ConfigureAwait(false) ) {
98
reader
.MoveToElement();
99
Debug.Assert(
reader
.Depth >= initialDepth );
100
if (
reader
.Depth == initialDepth ) {
101
if (
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement ) {
103
if ( await
reader
.ReadAsync().ConfigureAwait(false) ) {
104
while (
reader
.NodeType != XmlNodeType.EndElement &&
reader
.Depth > initialDepth ) {
105
await
reader
.SkipAsync().ConfigureAwait(false);
109
Debug.Assert(
reader
.NodeType == XmlNodeType.EndElement ||
110
reader
.NodeType == XmlNodeType.Element &&
reader
.IsEmptyElement ||
111
reader
.ReadState != ReadState.Interactive );
117
if (
reader
.NodeType == XmlNodeType.Element && !
reader
.IsEmptyElement ) {
120
await
reader
.SkipAsync().ConfigureAwait(false);
123
Debug.Assert(
reader
.Depth >= initialDepth );
165
object value = await
reader
.ReadContentAsObjectAsync().ConfigureAwait(false);
178
string value = await
reader
.ReadContentAsStringAsync().ConfigureAwait(false);
191
object value = await
reader
.ReadContentAsAsync( returnType, namespaceResolver ).ConfigureAwait(false);
217
if ( curNsAttr != -1 &&
reader
.CanReadBinaryContent ) {
241
return await
reader
.ReadContentAsBase64Async( buffer, index, count ).ConfigureAwait(false);
252
int read = await
reader
.ReadContentAsBase64Async( buffer, index, count ).ConfigureAwait(false);
287
int read = await
reader
.ReadContentAsBase64Async( buffer, index, count ).ConfigureAwait(false);
292
throw new XmlException(Res.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
300
if (
reader
.Depth == initialDepth ) {
336
if (curNsAttr != -1 &&
reader
.CanReadBinaryContent) {
359
return await
reader
.ReadContentAsBinHexAsync( buffer, index, count ).ConfigureAwait(false);
370
int read = await
reader
.ReadContentAsBinHexAsync( buffer, index, count ).ConfigureAwait(false);
404
int read = await
reader
.ReadContentAsBinHexAsync( buffer, index, count ).ConfigureAwait(false);
409
throw new XmlException(Res.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
417
if (
reader
.Depth == initialDepth ) {
448
if (curNsAttr != -1 &&
reader
.CanReadValueChunk) {
469
return
reader
.ReadValueChunkAsync(buffer, index, count);
485
throw
reader
.CreateReadElementContentAsException( "ReadElementContentAsBase64" );
497
throw new XmlException(Res.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
515
while ( await
reader
.ReadContentAsBase64Async( bytes, 0, 256 ).ConfigureAwait(false) > 0 ) ;
518
while ( await
reader
.ReadContentAsBinHexAsync( bytes, 0, 256 ).ConfigureAwait(false) > 0 ) ;
522
throw new XmlException(Res.Xml_InvalidNodeType,
reader
.NodeType.ToString(),
reader
as IXmlLineInfo);
530
if (
reader
.Depth == initialDepth ) {
544
while ( await
reader
.ReadContentAsBase64Async( bytes, 0, 256 ).ConfigureAwait(false) > 0 ) ;
547
while ( await
reader
.ReadContentAsBinHexAsync( bytes, 0, 256 ).ConfigureAwait(false) > 0 ) ;
554
if (
reader
.Depth == initialDepth ) {
System\Xml\Core\XmlWrappingReader.cs (39)
37
public override XmlReaderSettings Settings { get { return
reader
.Settings; } }
38
public override XmlNodeType NodeType { get { return
reader
.NodeType; } }
39
public override string Name { get { return
reader
.Name; } }
40
public override string LocalName { get { return
reader
.LocalName; } }
41
public override string NamespaceURI { get { return
reader
.NamespaceURI; } }
42
public override string Prefix { get { return
reader
.Prefix; } }
43
public override bool HasValue { get { return
reader
.HasValue; } }
44
public override string Value { get { return
reader
.Value; } }
45
public override int Depth { get { return
reader
.Depth; } }
46
public override string BaseURI { get { return
reader
.BaseURI; } }
47
public override bool IsEmptyElement { get { return
reader
.IsEmptyElement; } }
48
public override bool IsDefault { get { return
reader
.IsDefault; } }
49
public override XmlSpace XmlSpace { get { return
reader
.XmlSpace; } }
50
public override string XmlLang { get { return
reader
.XmlLang; } }
51
public override System.Type ValueType { get { return
reader
.ValueType; } }
52
public override int AttributeCount { get { return
reader
.AttributeCount; } }
53
public override bool EOF { get { return
reader
.EOF; } }
54
public override ReadState ReadState { get { return
reader
.ReadState; } }
55
public override bool HasAttributes { get { return
reader
.HasAttributes; } }
56
public override XmlNameTable NameTable { get { return
reader
.NameTable; } }
57
public override bool CanResolveEntity { get { return
reader
.CanResolveEntity; } }
60
public override IXmlSchemaInfo SchemaInfo { get { return
reader
.SchemaInfo; } }
61
public override char QuoteChar { get { return
reader
.QuoteChar; } }
65
return
reader
.GetAttribute( name );
69
return
reader
.GetAttribute( name, namespaceURI );
73
return
reader
.GetAttribute( i );
77
return
reader
.MoveToAttribute( name );
81
return
reader
.MoveToAttribute( name, ns );
85
reader
.MoveToAttribute( i );
89
return
reader
.MoveToFirstAttribute();
93
return
reader
.MoveToNextAttribute();
97
return
reader
.MoveToElement();
101
return
reader
.Read();
105
reader
.Close();
109
reader
.Skip();
113
return
reader
.LookupNamespace( prefix );
117
reader
.ResolveEntity();
121
return
reader
.ReadAttributeValue();
149
return
reader
.DtdInfo;
System\Xml\Core\XmlWrappingReaderAsync.cs (3)
15
return
reader
.GetValueAsync();
19
return
reader
.ReadAsync();
23
return
reader
.SkipAsync();