Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- ScrollEvent.cs
- SoapFault.cs
- CurrencyWrapper.cs
- RunClient.cs
- TabControlAutomationPeer.cs
- CreateUserWizard.cs
- DelegateSerializationHolder.cs
- SourceItem.cs
- SourceChangedEventArgs.cs
- ConfigurationProviderException.cs
- ProfileParameter.cs
- RadialGradientBrush.cs
- SafeEventHandle.cs
- SoapIncludeAttribute.cs
- TextParagraphView.cs
- EnumerableRowCollectionExtensions.cs
- FixedPosition.cs
- datacache.cs
- WizardStepBase.cs
- InvalidAsynchronousStateException.cs
- DataGridViewUtilities.cs
- HtmlSelectionListAdapter.cs
- MessageTransmitTraceRecord.cs
- MsmqIntegrationInputMessage.cs
- activationcontext.cs
- XAMLParseException.cs
- DbParameterCollectionHelper.cs
- Variable.cs
- FormsAuthentication.cs
- MenuItem.cs
- listitem.cs
- DateTimeSerializationSection.cs
- XmlUtil.cs
- ElementFactory.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- RelatedCurrencyManager.cs
- IssuedTokenServiceCredential.cs
- WebContext.cs
- ObjectDataSourceChooseMethodsPanel.cs
- InvalidPrinterException.cs
- FixUpCollection.cs
- RepeaterItem.cs
- ComponentEditorPage.cs
- DrawingContext.cs
- DocumentEventArgs.cs
- storepermissionattribute.cs
- FontUnitConverter.cs
- WindowsListView.cs
- AutomationPatternInfo.cs
- altserialization.cs
- SRef.cs
- ReplyChannelBinder.cs
- WindowsRegion.cs
- _Events.cs
- CodeBlockBuilder.cs
- ValueType.cs
- MarkerProperties.cs
- XmlSequenceWriter.cs
- PerfService.cs
- ParsedAttributeCollection.cs
- WebPartCollection.cs
- DataSysAttribute.cs
- DocumentViewer.cs
- TextProperties.cs
- InstanceLockLostException.cs
- APCustomTypeDescriptor.cs
- EndpointNotFoundException.cs
- ListGeneralPage.cs
- XmlSchemaSimpleType.cs
- GroupByExpressionRewriter.cs
- DefaultBindingPropertyAttribute.cs
- XmlUTF8TextWriter.cs
- FontUnitConverter.cs
- SystemIPGlobalStatistics.cs
- XmlSchemaSet.cs
- ResourceDescriptionAttribute.cs
- XPathEmptyIterator.cs
- HttpGetProtocolReflector.cs
- DataSourceCacheDurationConverter.cs
- NameSpaceExtractor.cs
- ModelItemDictionaryImpl.cs
- DrawTreeNodeEventArgs.cs
- DataSourceSerializationException.cs
- SharedStatics.cs
- sitestring.cs
- HtmlElementCollection.cs
- WebPartConnectionsCancelEventArgs.cs
- ExpressionBuilderCollection.cs
- RuntimeArgumentHandle.cs
- DataFormats.cs
- COM2ExtendedTypeConverter.cs
- ConnectionPoolManager.cs
- ContourSegment.cs
- SystemIPv6InterfaceProperties.cs
- ModifierKeysConverter.cs
- CompensationHandlingFilter.cs
- BufferBuilder.cs
- CharEnumerator.cs
- SupportsEventValidationAttribute.cs
- NonClientArea.cs