Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Configuration / System / Configuration / ConfigXmlReader.cs / 1 / 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
- MaskedTextProvider.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- AsymmetricKeyExchangeFormatter.cs
- BrowserCapabilitiesFactoryBase.cs
- HttpClientChannel.cs
- ExtensionSurface.cs
- ArcSegment.cs
- NativeMethods.cs
- SqlTriggerAttribute.cs
- DataServiceRequest.cs
- XsdValidatingReader.cs
- PowerModeChangedEventArgs.cs
- WebPartEditorOkVerb.cs
- ListViewDataItem.cs
- DefaultHttpHandler.cs
- CqlWriter.cs
- SchemaCollectionPreprocessor.cs
- SynchronizationContext.cs
- PkcsUtils.cs
- Types.cs
- QuaternionAnimationUsingKeyFrames.cs
- GraphicsContainer.cs
- Soap12FormatExtensions.cs
- ArraySortHelper.cs
- ToolStripButton.cs
- ScriptControlDescriptor.cs
- TreeNode.cs
- LinqDataSource.cs
- SecurityPermission.cs
- CompilerGeneratedAttribute.cs
- MethodRental.cs
- DispatcherEventArgs.cs
- LinkUtilities.cs
- ConnectionPoolManager.cs
- TransformedBitmap.cs
- PlaceHolder.cs
- ObjectDataSourceMethodEventArgs.cs
- Debug.cs
- DoWorkEventArgs.cs
- ProjectionPruner.cs
- CryptoKeySecurity.cs
- RoleGroup.cs
- PopupEventArgs.cs
- ProfileGroupSettings.cs
- WeakKeyDictionary.cs
- SrgsSemanticInterpretationTag.cs
- ImportCatalogPart.cs
- WorkflowDesigner.cs
- KeysConverter.cs
- RelatedCurrencyManager.cs
- DataGridAddNewRow.cs
- LogicalMethodInfo.cs
- HttpCacheVary.cs
- ReadOnlyPropertyMetadata.cs
- WindowsBrush.cs
- MemberPathMap.cs
- ToolStripProgressBar.cs
- ClassicBorderDecorator.cs
- StreamDocument.cs
- TriggerAction.cs
- SamlSecurityTokenAuthenticator.cs
- Token.cs
- CustomGrammar.cs
- IOException.cs
- XappLauncher.cs
- CompositeKey.cs
- MainMenu.cs
- StreamGeometry.cs
- ApplyImportsAction.cs
- MatrixAnimationUsingPath.cs
- NodeFunctions.cs
- CommonDialog.cs
- NumberFunctions.cs
- xmlglyphRunInfo.cs
- DeviceOverridableAttribute.cs
- TypeNameParser.cs
- EntityDesignerBuildProvider.cs
- WmiEventSink.cs
- CommandManager.cs
- SequentialUshortCollection.cs
- WindowShowOrOpenTracker.cs
- TdsParserStaticMethods.cs
- TablePattern.cs
- BindingMAnagerBase.cs
- ByteStream.cs
- GridViewColumnHeader.cs
- Storyboard.cs
- EmptyStringExpandableObjectConverter.cs
- HttpUnhandledOperationInvoker.cs
- FacetValueContainer.cs
- AnimatedTypeHelpers.cs
- SByteStorage.cs
- DataSourceControl.cs
- CodeCatchClauseCollection.cs
- AssemblyHash.cs
- HttpProcessUtility.cs
- DataViewListener.cs
- BulletedList.cs
- EntityTemplateFactory.cs
- HelpProvider.cs