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
- FaultDesigner.cs
- AppSecurityManager.cs
- TreeBuilderBamlTranslator.cs
- XmlPreloadedResolver.cs
- EdgeProfileValidation.cs
- ReferencedAssemblyResolver.cs
- BeginStoryboard.cs
- LinearGradientBrush.cs
- RelationshipEnd.cs
- filewebrequest.cs
- FlowDocumentPage.cs
- TraceHwndHost.cs
- DataGridViewImageCell.cs
- WebPartConnectionCollection.cs
- WebPartTracker.cs
- ExpressionStringBuilder.cs
- SHA1Managed.cs
- InputLanguageManager.cs
- StatusBarAutomationPeer.cs
- WorkflowOperationAsyncResult.cs
- ImageFormat.cs
- EntityCollectionChangedParams.cs
- TypeDescriptionProviderAttribute.cs
- Win32.cs
- WindowsScroll.cs
- Hash.cs
- WmlTextViewAdapter.cs
- SapiGrammar.cs
- SQLInt32Storage.cs
- ToolStripRenderer.cs
- DataListItemEventArgs.cs
- NameObjectCollectionBase.cs
- SupportingTokenAuthenticatorSpecification.cs
- CookieProtection.cs
- SettingsAttributeDictionary.cs
- SvcMapFileSerializer.cs
- Memoizer.cs
- PeerResolverSettings.cs
- ResourceSetExpression.cs
- AssemblyBuilderData.cs
- WebPartHelpVerb.cs
- ICspAsymmetricAlgorithm.cs
- RadioButton.cs
- TreeNodeClickEventArgs.cs
- ServiceSecurityContext.cs
- LayeredChannelFactory.cs
- XmlElementAttribute.cs
- ListDictionaryInternal.cs
- _NegoState.cs
- NetSectionGroup.cs
- X509Chain.cs
- TraceData.cs
- WebBrowsableAttribute.cs
- LogReserveAndAppendState.cs
- TextContainerHelper.cs
- LookupBindingPropertiesAttribute.cs
- entitydatasourceentitysetnameconverter.cs
- DataServiceSaveChangesEventArgs.cs
- WebEventTraceProvider.cs
- PageThemeBuildProvider.cs
- sitestring.cs
- CLSCompliantAttribute.cs
- SettingsBindableAttribute.cs
- localization.cs
- ProjectedSlot.cs
- ChooseAction.cs
- Types.cs
- StateDesignerConnector.cs
- RadioButtonBaseAdapter.cs
- Util.cs
- RegexWorker.cs
- FlowDocumentView.cs
- ChannelOptions.cs
- MobileComponentEditorPage.cs
- WebEventTraceProvider.cs
- SrgsGrammarCompiler.cs
- TogglePatternIdentifiers.cs
- AccessKeyManager.cs
- XmlBindingWorker.cs
- ConditionCollection.cs
- PingOptions.cs
- SineEase.cs
- MediaTimeline.cs
- SystemIPGlobalProperties.cs
- NativeMsmqMessage.cs
- SecureUICommand.cs
- WebPartHeaderCloseVerb.cs
- EventMappingSettings.cs
- AssemblyCollection.cs
- InputLanguageSource.cs
- WorkflowDesigner.cs
- MatrixAnimationUsingKeyFrames.cs
- ConfigurationElementProperty.cs
- RedistVersionInfo.cs
- ImageField.cs
- WindowsBrush.cs
- ADMembershipUser.cs
- PcmConverter.cs
- ACL.cs
- PropertyGridDesigner.cs