Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- HttpListenerTimeoutManager.cs
- MobileControl.cs
- BuildManager.cs
- COMException.cs
- DeviceSpecificChoice.cs
- ContentElementAutomationPeer.cs
- SoapElementAttribute.cs
- smtpconnection.cs
- ConfigurationConverterBase.cs
- RightsManagementInformation.cs
- MarkupExtensionReturnTypeAttribute.cs
- DocumentGridPage.cs
- NetworkInformationPermission.cs
- EllipseGeometry.cs
- HtmlTextArea.cs
- LineSegment.cs
- BindingSource.cs
- CLRBindingWorker.cs
- CollectionViewGroupRoot.cs
- DataControlImageButton.cs
- SoapDocumentServiceAttribute.cs
- FastEncoder.cs
- ListViewCommandEventArgs.cs
- activationcontext.cs
- TypeSystemProvider.cs
- MediaPlayer.cs
- JsonEncodingStreamWrapper.cs
- MultipleViewPattern.cs
- DataObjectPastingEventArgs.cs
- IgnoreSectionHandler.cs
- EventListenerClientSide.cs
- OpCopier.cs
- FunctionDetailsReader.cs
- SystemSounds.cs
- LogWriteRestartAreaAsyncResult.cs
- HitTestDrawingContextWalker.cs
- CharacterString.cs
- safelink.cs
- DeclarativeCatalogPart.cs
- SchemaMerger.cs
- OdbcConnectionFactory.cs
- UIElementIsland.cs
- ColumnClickEvent.cs
- TranslateTransform3D.cs
- BrowserDefinitionCollection.cs
- VBCodeProvider.cs
- AttributeEmitter.cs
- PropertyRecord.cs
- SHA256.cs
- HttpFileCollectionWrapper.cs
- LinearKeyFrames.cs
- HtmlTableCellCollection.cs
- ToolBarButtonClickEvent.cs
- ImageFormatConverter.cs
- XPathNavigator.cs
- xsdvalidator.cs
- PerformanceCounterPermissionAttribute.cs
- ContextMenuStrip.cs
- GenericIdentity.cs
- ProxyHwnd.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- ImageListUtils.cs
- ObfuscateAssemblyAttribute.cs
- CompositeActivityMarkupSerializer.cs
- storepermission.cs
- InitialServerConnectionReader.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- XmlSchemas.cs
- SafeTimerHandle.cs
- Vector3DIndependentAnimationStorage.cs
- ManagedFilter.cs
- WebPartConnectionsCloseVerb.cs
- cache.cs
- TransactedBatchContext.cs
- FtpWebResponse.cs
- WorkflowRuntimeServicesBehavior.cs
- WindowsIPAddress.cs
- HttpCachePolicyWrapper.cs
- QilUnary.cs
- HierarchicalDataBoundControl.cs
- SslStream.cs
- Barrier.cs
- ModulesEntry.cs
- CodeTypeReferenceExpression.cs
- RoleManagerEventArgs.cs
- Point4D.cs
- AttachedPropertyDescriptor.cs
- ControlPropertyNameConverter.cs
- EvidenceTypeDescriptor.cs
- MediaContext.cs
- PublisherMembershipCondition.cs
- EdmComplexPropertyAttribute.cs
- ObjectViewFactory.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ScriptReferenceBase.cs
- HtmlPanelAdapter.cs
- XmlObjectSerializerWriteContextComplex.cs
- TextSelectionProcessor.cs
- IriParsingElement.cs
- COMException.cs