Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigXmlReader.cs / 1305376 / ConfigXmlReader.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Configuration.Internal; using System.Collections; using System.Collections.Specialized; using System.Collections.Generic; using System.Configuration; using System.Globalization; using System.IO; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; using System.Text; using System.Xml; using System.Net; internal sealed class ConfigXmlReader : XmlTextReader, IConfigErrorInfo { string _rawXml; int _lineOffset; string _filename; // Used in a decrypted configuration section to locate // the line where the ecnrypted section begins. bool _lineNumberIsConstant; internal ConfigXmlReader(string rawXml, string filename, int lineOffset) : this(rawXml, filename, lineOffset, false) { } internal ConfigXmlReader(string rawXml, string filename, int lineOffset, bool lineNumberIsConstant) : base(new StringReader(rawXml)) { _rawXml = rawXml; _filename = filename; _lineOffset = lineOffset; _lineNumberIsConstant = lineNumberIsConstant; Debug.Assert(!_lineNumberIsConstant || _lineOffset > 0, "!_lineNumberIsConstant || _lineOffset > 0"); } internal ConfigXmlReader Clone() { return new ConfigXmlReader(_rawXml, _filename, _lineOffset, _lineNumberIsConstant); } int IConfigErrorInfo.LineNumber { get { if (_lineNumberIsConstant) { return _lineOffset; } else if (_lineOffset > 0) { return base.LineNumber + (_lineOffset - 1); } else { return base.LineNumber; } } } string IConfigErrorInfo.Filename { get { return _filename; } } internal string RawXml { get { return _rawXml; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PersonalizationProviderCollection.cs
- UpDownEvent.cs
- ListViewItemMouseHoverEvent.cs
- DesignerActionUI.cs
- ObjectDataSourceStatusEventArgs.cs
- ListItemCollection.cs
- ClientUriBehavior.cs
- XmlSchemaInferenceException.cs
- CustomTokenProvider.cs
- RowToFieldTransformer.cs
- BuildProvider.cs
- Argument.cs
- ServiceChannelFactory.cs
- State.cs
- ValuePattern.cs
- UnauthorizedWebPart.cs
- TextBox.cs
- LeaseManager.cs
- Win32PrintDialog.cs
- DateRangeEvent.cs
- ActiveDocumentEvent.cs
- CompositeFontFamily.cs
- XhtmlConformanceSection.cs
- LogStream.cs
- ParserOptions.cs
- DrawingAttributes.cs
- RepeaterItem.cs
- ConfigurationHelpers.cs
- BindingManagerDataErrorEventArgs.cs
- StyleSheetDesigner.cs
- ErrorTableItemStyle.cs
- HostingEnvironmentSection.cs
- StringFreezingAttribute.cs
- TextSegment.cs
- ParsedRoute.cs
- DescendantOverDescendantQuery.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- CLRBindingWorker.cs
- SystemIcmpV6Statistics.cs
- WindowShowOrOpenTracker.cs
- XmlCountingReader.cs
- SafeCloseHandleCritical.cs
- BrowserDefinition.cs
- XmlAnyAttributeAttribute.cs
- WindowsButton.cs
- TextEditorSelection.cs
- DataStreamFromComStream.cs
- PlanCompilerUtil.cs
- IncrementalCompileAnalyzer.cs
- Pair.cs
- AncillaryOps.cs
- GlobalProxySelection.cs
- GAC.cs
- MemberBinding.cs
- TCPClient.cs
- ExpandCollapseProviderWrapper.cs
- RoleGroupCollection.cs
- MatrixKeyFrameCollection.cs
- WebPart.cs
- CommandDevice.cs
- ActivityTypeDesigner.xaml.cs
- WindowsSecurityTokenAuthenticator.cs
- XPathEmptyIterator.cs
- ScrollItemProviderWrapper.cs
- MbpInfo.cs
- ConfigurationManager.cs
- CommandPlan.cs
- DependsOnAttribute.cs
- DirectoryInfo.cs
- RedirectionProxy.cs
- XPathNodePointer.cs
- PageCatalogPart.cs
- TextStore.cs
- CustomErrorsSection.cs
- ErrorFormatterPage.cs
- VectorAnimationBase.cs
- VersionedStream.cs
- ClassDataContract.cs
- JoinTreeSlot.cs
- IntegerValidator.cs
- TextElementAutomationPeer.cs
- ResourceProviderFactory.cs
- __ComObject.cs
- DictionaryTraceRecord.cs
- LinkClickEvent.cs
- NaturalLanguageHyphenator.cs
- Highlights.cs
- ToolStripOverflowButton.cs
- TemplateBindingExtensionConverter.cs
- PhonemeConverter.cs
- RoutedEventValueSerializer.cs
- OneWayChannelFactory.cs
- WindowsContainer.cs
- TemplateLookupAction.cs
- ZipFileInfoCollection.cs
- XmlTextEncoder.cs
- ManagementQuery.cs
- ControlType.cs
- RadioButtonDesigner.cs
- CommandConverter.cs