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
- Application.cs
- DataBinder.cs
- ContentType.cs
- StringOutput.cs
- CreateUserWizardStep.cs
- Expander.cs
- WeakEventManager.cs
- AddInController.cs
- WebHostUnsafeNativeMethods.cs
- SupportsEventValidationAttribute.cs
- ClientTargetSection.cs
- WebPartMenuStyle.cs
- IdentityHolder.cs
- MetadataArtifactLoaderResource.cs
- cookiecontainer.cs
- ColorAnimationUsingKeyFrames.cs
- Terminate.cs
- SerialStream.cs
- BmpBitmapEncoder.cs
- DependencyPropertyDescriptor.cs
- base64Transforms.cs
- ReadWriteSpinLock.cs
- UserControlFileEditor.cs
- StateDesigner.Helpers.cs
- DependencyPropertyHelper.cs
- VarInfo.cs
- XmlSchemaComplexType.cs
- HtmlEmptyTagControlBuilder.cs
- HttpCapabilitiesEvaluator.cs
- Error.cs
- PathData.cs
- NativeMethods.cs
- XomlCompiler.cs
- XmlEntity.cs
- PropertyToken.cs
- BitmapEffectRenderDataResource.cs
- ButtonColumn.cs
- PtsContext.cs
- WinFormsSpinner.cs
- TaskScheduler.cs
- XmlCustomFormatter.cs
- GroupDescription.cs
- SingleTagSectionHandler.cs
- ButtonPopupAdapter.cs
- XmlSchemaAnnotation.cs
- CodeGen.cs
- SourceElementsCollection.cs
- Trace.cs
- MiniLockedBorderGlyph.cs
- TableStyle.cs
- SortKey.cs
- PrinterResolution.cs
- ProjectionCamera.cs
- AstNode.cs
- SequenceNumber.cs
- EventLogTraceListener.cs
- FixedPageAutomationPeer.cs
- ContextActivityUtils.cs
- PrivilegeNotHeldException.cs
- DbQueryCommandTree.cs
- EntityDesignerBuildProvider.cs
- ColorTransform.cs
- MaskedTextBoxTextEditor.cs
- BinaryFormatter.cs
- PersonalizationProviderHelper.cs
- EntityModelBuildProvider.cs
- PersonalizationDictionary.cs
- RoleGroupCollection.cs
- XPathExpr.cs
- CategoryAttribute.cs
- XPathSelfQuery.cs
- StorageScalarPropertyMapping.cs
- COMException.cs
- DataGridViewComboBoxColumn.cs
- ScrollData.cs
- ExtractedStateEntry.cs
- ChtmlImageAdapter.cs
- smtppermission.cs
- TabControlToolboxItem.cs
- basecomparevalidator.cs
- EntityRecordInfo.cs
- NativeMethodsOther.cs
- ServiceOperationUIEditor.cs
- HashHelpers.cs
- CustomLineCap.cs
- DataGridRowEventArgs.cs
- WorkflowDefinitionDispenser.cs
- RadioButtonDesigner.cs
- HelloOperationCD1AsyncResult.cs
- IsolatedStorage.cs
- TypeConverterHelper.cs
- ListViewUpdatedEventArgs.cs
- XmlDataCollection.cs
- HttpConfigurationSystem.cs
- ActiveXSite.cs
- webeventbuffer.cs
- TextContainerChangeEventArgs.cs
- ClientTarget.cs
- selecteditemcollection.cs
- DataRelationCollection.cs