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
- Rect.cs
- TreeNode.cs
- IdentitySection.cs
- ExpressionVisitor.cs
- Encoder.cs
- PEFileEvidenceFactory.cs
- DocumentsTrace.cs
- SqlUtils.cs
- CultureInfo.cs
- ToolStripOverflow.cs
- XsdBuilder.cs
- MembershipPasswordException.cs
- GridViewSortEventArgs.cs
- Inflater.cs
- VirtualizedCellInfoCollection.cs
- LinqDataSourceHelper.cs
- WebConfigurationManager.cs
- BitmapPalette.cs
- Model3DGroup.cs
- FontDialog.cs
- HttpCacheParams.cs
- ListComponentEditor.cs
- AddInControllerImpl.cs
- CodeCompileUnit.cs
- TextEffectResolver.cs
- CalendarSelectionChangedEventArgs.cs
- WebPartVerbsEventArgs.cs
- ListSourceHelper.cs
- ConfigurationValidatorBase.cs
- ModifiableIteratorCollection.cs
- AggregateNode.cs
- UidPropertyAttribute.cs
- FolderLevelBuildProviderCollection.cs
- DNS.cs
- BamlRecordHelper.cs
- SelectionProcessor.cs
- GenericParameterDataContract.cs
- ScrollChrome.cs
- AsnEncodedData.cs
- HelpKeywordAttribute.cs
- HttpAsyncResult.cs
- ICspAsymmetricAlgorithm.cs
- PrinterUnitConvert.cs
- ToolStripItemTextRenderEventArgs.cs
- GridViewRowPresenter.cs
- EdmComplexPropertyAttribute.cs
- FigureParagraph.cs
- OwnerDrawPropertyBag.cs
- BaseResourcesBuildProvider.cs
- SecurityTokenException.cs
- SynchronizationHandlesCodeDomSerializer.cs
- DeclarativeCatalogPart.cs
- MemberAccessException.cs
- X509Certificate.cs
- BinaryWriter.cs
- Collection.cs
- StandardCommands.cs
- OracleParameterCollection.cs
- SizeConverter.cs
- DescendantQuery.cs
- TraceXPathNavigator.cs
- TextCharacters.cs
- NumericExpr.cs
- ExternalException.cs
- GroupByQueryOperator.cs
- DependentTransaction.cs
- WebPartChrome.cs
- MsdtcClusterUtils.cs
- GlyphElement.cs
- _NativeSSPI.cs
- BuildResultCache.cs
- DataSourceCache.cs
- _ListenerResponseStream.cs
- CatalogPartCollection.cs
- WinFormsComponentEditor.cs
- CompoundFileIOPermission.cs
- InvalidCastException.cs
- MouseWheelEventArgs.cs
- CodeSubDirectory.cs
- CodeChecksumPragma.cs
- WebPartVerbsEventArgs.cs
- RegionInfo.cs
- LeafCellTreeNode.cs
- ReadOnlyDictionary.cs
- VectorAnimation.cs
- sqlcontext.cs
- DbUpdateCommandTree.cs
- ClientClassGenerator.cs
- ReadOnlyTernaryTree.cs
- TranslateTransform.cs
- DataGridViewCellStyleConverter.cs
- DataGridParentRows.cs
- ReliableMessagingVersionConverter.cs
- MemoryPressure.cs
- DiscoveryDocument.cs
- StoryFragments.cs
- PersonalizationAdministration.cs
- ListBoxItemAutomationPeer.cs
- RadioButtonList.cs