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
- CodeDefaultValueExpression.cs
- SHA256Managed.cs
- ColorBlend.cs
- SoapFault.cs
- RectangleHotSpot.cs
- XmlQueryOutput.cs
- AssociationSet.cs
- DoubleLinkListEnumerator.cs
- ChannelFactory.cs
- Classification.cs
- CodeAccessPermission.cs
- Queue.cs
- Message.cs
- HwndStylusInputProvider.cs
- SqlVersion.cs
- ToolboxItem.cs
- RSAPKCS1KeyExchangeFormatter.cs
- CreateParams.cs
- ActivityXRefConverter.cs
- COM2ExtendedUITypeEditor.cs
- ServicePointManagerElement.cs
- SymbolTable.cs
- invalidudtexception.cs
- RootBuilder.cs
- SyncOperationState.cs
- IISUnsafeMethods.cs
- QueryableFilterUserControl.cs
- CompilerWrapper.cs
- SystemThemeKey.cs
- Condition.cs
- Claim.cs
- RadioButton.cs
- XmlElementAttribute.cs
- ConsumerConnectionPoint.cs
- SecurityCapabilities.cs
- assemblycache.cs
- MapPathBasedVirtualPathProvider.cs
- StateMachineHelpers.cs
- PropertyMap.cs
- AnnotationResource.cs
- SequenceDesigner.cs
- PixelFormatConverter.cs
- OciHandle.cs
- ValidatorCollection.cs
- ClockGroup.cs
- DataServiceResponse.cs
- PageContentCollection.cs
- RegionData.cs
- TdsRecordBufferSetter.cs
- FileUtil.cs
- IndependentlyAnimatedPropertyMetadata.cs
- SQLSingleStorage.cs
- EntityCommandExecutionException.cs
- WindowsTokenRoleProvider.cs
- X509PeerCertificateAuthenticationElement.cs
- ListControl.cs
- ChildrenQuery.cs
- ConfigurationSection.cs
- IUnknownConstantAttribute.cs
- FrameworkContentElement.cs
- AssemblyHash.cs
- TreeChangeInfo.cs
- Model3D.cs
- CqlGenerator.cs
- GPRECTF.cs
- SerializableAuthorizationContext.cs
- SafeNativeMethods.cs
- AdornerLayer.cs
- MenuItem.cs
- XamlStream.cs
- TemplatedWizardStep.cs
- ValueProviderWrapper.cs
- TraceContextEventArgs.cs
- ScrollViewerAutomationPeer.cs
- WebPartVerbsEventArgs.cs
- _AutoWebProxyScriptHelper.cs
- CryptoStream.cs
- GeneralTransform2DTo3D.cs
- EntityDataSourceChangingEventArgs.cs
- WebRequest.cs
- ContentIterators.cs
- UIElementPropertyUndoUnit.cs
- RtType.cs
- TextDpi.cs
- FixedBufferAttribute.cs
- Pair.cs
- ThreadStaticAttribute.cs
- sqlpipe.cs
- TemplateControlParser.cs
- EnumMemberAttribute.cs
- OutputCacheProviderCollection.cs
- CalendarDayButton.cs
- EventManager.cs
- FrameworkRichTextComposition.cs
- ByteConverter.cs
- CompositeCollectionView.cs
- RowToFieldTransformer.cs
- TypeExtension.cs
- Help.cs
- ContextBase.cs