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
- CreateUserWizardStep.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- SpellerHighlightLayer.cs
- CannotUnloadAppDomainException.cs
- WorkflowServiceNamespace.cs
- BasePattern.cs
- Operand.cs
- Command.cs
- PathFigure.cs
- DbgCompiler.cs
- FileChangesMonitor.cs
- Visitors.cs
- ClientFactory.cs
- SchemaTypeEmitter.cs
- ScriptMethodAttribute.cs
- ControlDesigner.cs
- AuthorizationSection.cs
- FunctionParameter.cs
- DefaultSection.cs
- CacheDependency.cs
- TreeViewImageKeyConverter.cs
- FlowDocumentView.cs
- CheckedListBox.cs
- Attributes.cs
- TextFormatterHost.cs
- CodeDirectionExpression.cs
- ToolStripItemCollection.cs
- ListViewTableRow.cs
- TextTreeFixupNode.cs
- FileRegion.cs
- XmlAttributeCollection.cs
- HttpCachePolicyElement.cs
- KernelTypeValidation.cs
- TextProviderWrapper.cs
- NotifyIcon.cs
- DependencyPropertyValueSerializer.cs
- Operators.cs
- xml.cs
- SizeAnimationBase.cs
- StreamWriter.cs
- CertificateReferenceElement.cs
- IERequestCache.cs
- WindowsListBox.cs
- OdbcFactory.cs
- XslException.cs
- ScriptServiceAttribute.cs
- FileLoadException.cs
- InfoCardMetadataExchangeClient.cs
- WasAdminWrapper.cs
- ObjectComplexPropertyMapping.cs
- shaperfactoryquerycachekey.cs
- DbCommandDefinition.cs
- BindingNavigatorDesigner.cs
- DataGridViewRowStateChangedEventArgs.cs
- DbDataAdapter.cs
- PageBuildProvider.cs
- Error.cs
- SiteMapDataSourceView.cs
- OdbcErrorCollection.cs
- COM2ExtendedTypeConverter.cs
- MainMenu.cs
- ResolveRequestResponseAsyncResult.cs
- SoapSchemaExporter.cs
- ScrollPatternIdentifiers.cs
- ToolStripContentPanel.cs
- FilterQuery.cs
- ProxyGenerationError.cs
- XomlCompilerHelpers.cs
- SignatureResourcePool.cs
- SiteMapNodeItemEventArgs.cs
- PenLineJoinValidation.cs
- TransformerInfo.cs
- FixedSOMContainer.cs
- ServiceCredentialsElement.cs
- _OverlappedAsyncResult.cs
- DataGridViewTopLeftHeaderCell.cs
- NavigatorOutput.cs
- ObjectQueryState.cs
- AppSettingsSection.cs
- DefaultTextStore.cs
- precedingquery.cs
- COM2ExtendedBrowsingHandler.cs
- EmbossBitmapEffect.cs
- Metafile.cs
- EventSourceCreationData.cs
- TransformPatternIdentifiers.cs
- MouseDevice.cs
- StylusTip.cs
- OleDbCommandBuilder.cs
- Property.cs
- ProfilePropertySettings.cs
- DefaultPrintController.cs
- HybridDictionary.cs
- ScriptControlManager.cs
- SmtpClient.cs
- ToolStripLocationCancelEventArgs.cs
- DesignerDeviceConfig.cs
- TcpClientSocketManager.cs
- QueryResponse.cs
- GenericsInstances.cs