2 writes to Reader
System.Configuration.ConfigurationManager (2)
System\Configuration\XmlUtil.cs (2)
67Reader = new XmlTextReader(_stream) { XmlResolver = null }; 138Reader = null;
217 references to Reader
System.Configuration.ConfigurationManager (217)
System\Configuration\AppSettingsSection.cs (5)
111if (xmlUtil.Reader.Name != elementName) 116lineOffset = xmlUtil.Reader.LineNumber; 120while (!xmlUtil.Reader.EOF) 122XmlNodeType t = xmlUtil.Reader.NodeType; 126xmlUtil.Reader.Read();
System\Configuration\BaseConfigurationRecord.cs (69)
571ConfigStreamInfo.StreamEncoding = xmlUtil.Reader.Encoding; 582if (xmlUtil.Reader.Depth == 1) ScanSections(xmlUtil); 1389while (xmlUtil.Reader.Depth > 0) 1391if (xmlUtil.Reader.Name == LocationTag) 1395xmlUtil.Reader.GetAttribute(LocationPathAttribute); 1435int depth = xmlUtil.Reader.Depth; 1438while (xmlUtil.Reader.Depth > depth) 1440if (xmlUtil.Reader.Name == name) 1453int lineOffset = xmlUtil.Reader.LineNumber; 1459if ((iKey == 0) && (xmlUtil.Reader.Name == LocationTag)) 1461string locationSubPath = xmlUtil.Reader.GetAttribute(LocationPathAttribute); 1505if (xmlUtil.Reader.Name != name) 1509string protectionProviderAttribute = xmlUtil.Reader.GetAttribute(ProtectionProviderAttribute); 1512if (xmlUtil.Reader.AttributeCount != 1) 1522int lineOffset = xmlUtil.Reader.LineNumber; 1526while (!xmlUtil.Reader.EOF) 1528XmlNodeType t = xmlUtil.Reader.NodeType; 1532xmlUtil.Reader.Read(); 1757if ((xmlUtil.Reader.NodeType != XmlNodeType.Element) || (xmlUtil.Reader.Name != ConfigurationTag)) 1762while (xmlUtil.Reader.MoveToNextAttribute()) 1763switch (xmlUtil.Reader.Name) 1766if (xmlUtil.Reader.Value == ConfigurationNamespace) 1776SR.Format(SR.Config_namespace_invalid, xmlUtil.Reader.Value, ConfigurationNamespace), 1788if ((xmlUtil.Reader.Depth != 1) || (xmlUtil.Reader.Name != ConfigSectionsTag)) 1817int depth = xmlUtil.Reader.Depth; 1820while (xmlUtil.Reader.Depth == depth + 1) 1824switch (xmlUtil.Reader.Name) 1831int lineNumber = xmlUtil.Reader.LineNumber; 1832while (xmlUtil.Reader.MoveToNextAttribute()) 1833switch (xmlUtil.Reader.Name) 1836tagName = xmlUtil.Reader.Value; 1848xmlUtil.Reader.MoveToElement(); 1917int lineNumber = xmlUtil.Reader.LineNumber; 1918while (xmlUtil.Reader.MoveToNextAttribute()) 1919switch (xmlUtil.Reader.Name) 1922tagName = xmlUtil.Reader.Value; 1935allowExeDefinition = AllowExeDefinitionToEnum(xmlUtil.Reader.Value, xmlUtil); 1962OverrideModeSetting.ParseOverrideModeXmlValue(xmlUtil.Reader.Value, xmlUtil)); 1979xmlUtil.Reader.MoveToElement(); 2067while (xmlUtil.Reader.MoveToNextAttribute()) 2069if (xmlUtil.Reader.Name != SectionNameAttribute) 2072name = xmlUtil.Reader.Value; 2074xmlUtil.Reader.MoveToElement(); 2094if (xmlUtil.Reader.Depth > depth + 1) 2100while (xmlUtil.Reader.Depth > depth + 1) xmlUtil.ReadToNextElement(); 2124xmlUtil.Reader.Value switch 2340depth = xmlUtil.Reader.Depth; 2344while (xmlUtil.Reader.Depth == depth + 1) 2346string tagName = xmlUtil.Reader.Name; 2434if (xmlUtil.Reader.AttributeCount > 0) 2438while (xmlUtil.Reader.MoveToNextAttribute()) 2439if (IsReservedAttributeName(xmlUtil.Reader.Name)) 2442xmlUtil.Reader.MoveToElement(); // if on an attribute move back to the element 2515if (xmlUtil.Reader.AttributeCount >= 1) 2519string configSourceAttribute = xmlUtil.Reader.GetAttribute(ConfigSourceAttribute); 2531if (xmlUtil.Reader.AttributeCount != 1) 2540string protectionProviderAttribute = xmlUtil.Reader.GetAttribute(ProtectionProviderAttribute); 2553if (xmlUtil.Reader.AttributeCount != 1) 2568if (!xmlUtil.Reader.IsEmptyElement) 2570while (xmlUtil.Reader.Read()) 2572XmlNodeType t = xmlUtil.Reader.NodeType; 2625if (xmlUtil.Reader.NodeType != XmlNodeType.Element) 2712while (xmlUtil.Reader.MoveToNextAttribute()) 2713switch (xmlUtil.Reader.Name) 2716locationSubPath = xmlUtil.Reader.Value; 2748OverrideModeSetting.ParseOverrideModeXmlValue(xmlUtil.Reader.Value, xmlUtil)); 2761xmlUtil.Reader.MoveToElement(); // if on an attribute move back to the element
System\Configuration\MgmtConfigurationRecord.cs (5)
2183if ((xmlUtil.Reader.NodeType == XmlNodeType.Element) && utilWriter.IsLastLineBlank) 2204XmlTextReader reader = xmlUtil.Reader; 2377XmlTextReader reader = xmlUtil.Reader; 2606XmlTextReader reader = xmlUtil.Reader; 3074XmlTextReader reader = xmlUtil.Reader;
System\Configuration\XmlUtil.cs (138)
78Reader.WhitespaceHandling = WhitespaceHandling.None; 81while (!done && Reader.Read()) 82switch (Reader.NodeType) 108int trueLinePosition = Reader.LinePosition - GetPositionOffset(Reader.NodeType); 120public int LineNumber => Reader.LineNumber; 134if (Reader != null) 137Reader.Close(); 156while (Reader.Read()) 157if (Reader.MoveToContent() == XmlNodeType.Element) 171Reader.Skip(); 172Reader.MoveToContent(); 174while (!Reader.EOF && (Reader.NodeType != XmlNodeType.Element)) 176Reader.Read(); 177Reader.MoveToContent(); 186while (Reader.Read()) 189if (Reader.NodeType == XmlNodeType.Element) return; 201Reader.Skip(); 203while (!Reader.EOF && (Reader.NodeType != XmlNodeType.Element)) 206Reader.Read(); 216int currentDepth = Reader.Depth; 219while (Reader.Depth >= currentDepth) Reader.Skip(); 221while (!Reader.EOF && (Reader.NodeType != XmlNodeType.EndElement)) 224Reader.Read(); 233XmlNodeType nodeType = Reader.NodeType; 250if (Reader.MoveToNextAttribute()) 273SR.Format(SR.Config_base_unrecognized_attribute, Reader.Name), 282SR.Format(SR.Config_missing_required_attribute, attrib, Reader.Name), 291SR.Format(SR.Config_reserved_attribute, Reader.Name), 308if (!string.IsNullOrEmpty(Reader.Value)) newValue = Reader.Value; 314SR.Format(SR.Empty_attribute, Reader.Name), 328switch (Reader.Value) 339new ConfigurationErrorsException(SR.Format(SR.Config_invalid_boolean_attribute, Reader.Name), this), 358bool isEmptyElement = Reader.IsEmptyElement; 359int startingLine = Reader.LineNumber; 361int depth = Reader.Depth; 364Debug.Assert(Reader.NodeType == XmlNodeType.Element, "Reader.NodeType == XmlNodeType.Element"); 371while (Reader.NodeType != XmlNodeType.EndElement) 372if (Reader.NodeType == XmlNodeType.Element) 374Reader.Skip(); 381if (Reader.NodeType == XmlNodeType.Whitespace) Reader.Skip(); 389if (Reader.LineNumber != startingLine) 397Debug.Assert(Reader.Depth == depth, "We should be at the same depth as the opening Element"); 417if (Reader.NodeType == XmlNodeType.EndElement) 420depth = Reader.Depth; 427if (Reader.NodeType == XmlNodeType.Element) 430if (Reader.Depth < depth) break; 452Debug.Assert(Reader.NodeType == XmlNodeType.Element, "_reader.NodeType == XmlNodeType.Element"); 458Reader.Skip(); 463int depth = limitDepth ? Reader.Depth : 0; 466Reader.Skip(); 468int lineNumberOfEndElement = Reader.LineNumber; 471while (!Reader.EOF) 473if (Reader.NodeType != XmlNodeType.Whitespace) 478if (Reader.LineNumber > lineNumberOfEndElement) 487Reader.Read(); 491while (!Reader.EOF) 493if (Reader.NodeType == XmlNodeType.Element) 496if (Reader.Depth < depth) break; 501return !Reader.EOF; 507Debug.Assert(Reader.NodeType == XmlNodeType.Element, "_reader.NodeType== XmlNodeType.Element"); 509int depth = Reader.Depth; 510bool isEmptyElement = Reader.IsEmptyElement; 516while (Reader.Depth > depth) CopyXmlNode(utilWriter); 554readerLineNumber = Reader.LineNumber; 555readerLinePosition = Reader.LinePosition; 561XmlNodeType nodeType = Reader.NodeType; 562if (nodeType == XmlNodeType.Whitespace) utilWriter.Write(Reader.Value); 567close = Reader.IsEmptyElement ? "/>" : ">"; 573lineNumber = Reader.LineNumber; 574linePosition = Reader.LinePosition + Reader.Name.Length; 577utilWriter.Write(Reader.Name); 589while (Reader.MoveToNextAttribute()) 595int attrLineNumber = Reader.LineNumber; 596int attrLinePosition = Reader.LinePosition; 602int charactersWritten = utilWriter.Write(Reader.Name); 604charactersWritten += utilWriter.AppendAttributeValue(Reader); 621lineNumber = Reader.LineNumber; 622linePosition = Reader.LinePosition + Reader.Name.Length; 625utilWriter.Write(Reader.Name); 629if (nodeType == XmlNodeType.Comment) utilWriter.AppendComment(Reader.Value); 632if (nodeType == XmlNodeType.Text) utilWriter.AppendEscapeTextString(Reader.Value); 643lineNumber = Reader.LineNumber; 644linePosition = Reader.LinePosition + 3; 658while (Reader.MoveToNextAttribute()) 664int attrLineNumber = Reader.LineNumber; 665int attrLinePosition = Reader.LinePosition; 672int charactersWritten = utilWriter.Write(Reader.Name); 674charactersWritten += utilWriter.AppendAttributeValue(Reader); 682Reader.MoveToElement(); 686if (nodeType == XmlNodeType.SignificantWhitespace) utilWriter.Write(Reader.Value); 701utilWriter.AppendProcessingInstruction(Reader.Name, Reader.Value); 706utilWriter.AppendEntityRef(Reader.Name); 710utilWriter.AppendCData(Reader.Value); 728_lastLinePosition + c, Reader.LineNumber, 729Reader.LinePosition); 732utilWriter.Write(Reader.Name); 736if (Reader.HasValue) dtdValue = Reader.Value; 742lineNumber = Reader.LineNumber; 743linePosition = Reader.LinePosition + Reader.Name.Length; 746if (Reader.MoveToFirstAttribute()) 750Reader.LineNumber, Reader.LinePosition); 753string attrName = Reader.Name; 756utilWriter.AppendAttributeValue(Reader); 757Reader.MoveToAttribute(0); 762Reader.MoveToAttribute(1); 764utilWriter.AppendAttributeValue(Reader); 765Reader.MoveToAttribute(1); 791bool moreToRead = Reader.Read(); 792nodeType = Reader.NodeType; 802int closeLineNumber = Reader.LineNumber; 803int closeLinePosition = Reader.LinePosition - startOffset - close.Length; 831Debug.Assert(Reader.NodeType == XmlNodeType.Element, 837element.Append(Reader.Name); 840while (Reader.MoveToNextAttribute()) 843element.Append(Reader.Name); 846element.Append(Reader.Value); 866Debug.Assert(Reader.NodeType == XmlNodeType.Element, "_reader.NodeType == NodeType.Element"); 871string elementName = Reader.Name; 874if (Reader.IsEmptyElement) 913Reader.Read(); 939WhitespaceHandling originalHandling = Reader.WhitespaceHandling; 940Reader.WhitespaceHandling = WhitespaceHandling.All; 949Reader.WhitespaceHandling = originalHandling; 952(Reader.NodeType == XmlNodeType.Whitespace)) 956Reader.Read();