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
- StringFreezingAttribute.cs
- TextTreeFixupNode.cs
- XmlExpressionDumper.cs
- ChangeConflicts.cs
- XamlPoint3DCollectionSerializer.cs
- PipelineModuleStepContainer.cs
- _ShellExpression.cs
- SafeUserTokenHandle.cs
- ToolStripItemRenderEventArgs.cs
- Compilation.cs
- DecoderNLS.cs
- OperationInvokerTrace.cs
- DetectEofStream.cs
- SafeArrayTypeMismatchException.cs
- FileAuthorizationModule.cs
- EDesignUtil.cs
- DispatcherHookEventArgs.cs
- XPathParser.cs
- AutomationProperty.cs
- SettingsPropertyIsReadOnlyException.cs
- CheckBoxFlatAdapter.cs
- RowToFieldTransformer.cs
- WebBrowser.cs
- WindowsTokenRoleProvider.cs
- HostingEnvironmentException.cs
- DataControlField.cs
- AbstractSvcMapFileLoader.cs
- ProxyWebPartConnectionCollection.cs
- documentation.cs
- VBCodeProvider.cs
- TypeConverter.cs
- UserUseLicenseDictionaryLoader.cs
- FrameSecurityDescriptor.cs
- XpsImageSerializationService.cs
- CancelEventArgs.cs
- BatchParser.cs
- XXXInfos.cs
- StreamUpdate.cs
- DictionaryItemsCollection.cs
- FormatVersion.cs
- WebCategoryAttribute.cs
- ImageSource.cs
- FormatException.cs
- UnionExpr.cs
- EdmItemError.cs
- AppDomainProtocolHandler.cs
- ProfileBuildProvider.cs
- UnsafeNativeMethods.cs
- Random.cs
- AncillaryOps.cs
- OperationAbortedException.cs
- OleDbRowUpdatingEvent.cs
- Attributes.cs
- TextServicesProperty.cs
- QilReference.cs
- MemberAccessException.cs
- Bitmap.cs
- FixUpCollection.cs
- XPathItem.cs
- GroupBoxRenderer.cs
- BmpBitmapDecoder.cs
- InvalidPrinterException.cs
- Regex.cs
- LocationReferenceValue.cs
- CorePropertiesFilter.cs
- XomlCompilerParameters.cs
- MatrixAnimationBase.cs
- WebUtil.cs
- TemplateAction.cs
- SecurityChannelFactory.cs
- CodeLinePragma.cs
- Normalization.cs
- ColorPalette.cs
- ReflectionPermission.cs
- ControlType.cs
- CompModSwitches.cs
- EntityDataSourceColumn.cs
- RequestTimeoutManager.cs
- FamilyMapCollection.cs
- SvcMapFileLoader.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- LayoutSettings.cs
- IDQuery.cs
- MutexSecurity.cs
- CharacterBufferReference.cs
- DefaultHttpHandler.cs
- MessagePropertyVariants.cs
- SplineQuaternionKeyFrame.cs
- Quaternion.cs
- ResumeStoryboard.cs
- ACE.cs
- HorizontalAlignConverter.cs
- PagePropertiesChangingEventArgs.cs
- UniqueEventHelper.cs
- UpDownBase.cs
- StringConverter.cs
- FileInfo.cs
- ServiceSecurityContext.cs
- NullRuntimeConfig.cs
- SqlUserDefinedAggregateAttribute.cs