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
- RootBuilder.cs
- XamlTemplateSerializer.cs
- RegexRunnerFactory.cs
- TransactionTraceIdentifier.cs
- ConvertersCollection.cs
- HtmlInputButton.cs
- PrinterResolution.cs
- CodeAssignStatement.cs
- RuleRef.cs
- BulletDecorator.cs
- TagPrefixCollection.cs
- IdentitySection.cs
- SqlNotificationEventArgs.cs
- SortedSet.cs
- EdmTypeAttribute.cs
- UIElementPropertyUndoUnit.cs
- DynamicQueryableWrapper.cs
- DataBindingList.cs
- TimelineCollection.cs
- StoreContentChangedEventArgs.cs
- ServicesExceptionNotHandledEventArgs.cs
- UserNameSecurityTokenProvider.cs
- Util.cs
- ImageKeyConverter.cs
- HostingEnvironment.cs
- QueryableDataSourceView.cs
- Line.cs
- TimeSpanParse.cs
- SchemaNamespaceManager.cs
- NamedPipeTransportSecurity.cs
- FixedSOMTableRow.cs
- DeploymentSection.cs
- OdbcStatementHandle.cs
- FormViewInsertEventArgs.cs
- Compress.cs
- ElementHostPropertyMap.cs
- TableCellCollection.cs
- Freezable.cs
- ToolStripLocationCancelEventArgs.cs
- ChangeTracker.cs
- SqlDataSourceQueryEditor.cs
- RijndaelManagedTransform.cs
- OpenTypeLayout.cs
- SubpageParaClient.cs
- WorkflowInspectionServices.cs
- HttpContext.cs
- OutputCacheModule.cs
- ConfigXmlDocument.cs
- EdmTypeAttribute.cs
- DesignerAttribute.cs
- Maps.cs
- Internal.cs
- ItemCheckEvent.cs
- SevenBitStream.cs
- SessionEndingCancelEventArgs.cs
- PerfCounters.cs
- Rule.cs
- CodeConstructor.cs
- XamlFrame.cs
- ConnectionsZone.cs
- CodeIndexerExpression.cs
- SvcMapFileLoader.cs
- DataGridViewCellParsingEventArgs.cs
- TrustManager.cs
- ContextMenu.cs
- Int32Collection.cs
- WindowsImpersonationContext.cs
- tibetanshape.cs
- CompositionCommandSet.cs
- NameHandler.cs
- ScriptResourceAttribute.cs
- SqlDataSourceStatusEventArgs.cs
- WpfKnownType.cs
- SqlServer2KCompatibilityCheck.cs
- TypeReference.cs
- XmlTextAttribute.cs
- ErrorTableItemStyle.cs
- SafeNativeMethodsCLR.cs
- IndentedTextWriter.cs
- SafeBitVector32.cs
- DependencyObjectProvider.cs
- SqlDataSourceWizardForm.cs
- BitmapCache.cs
- Divide.cs
- SafeRightsManagementQueryHandle.cs
- SessionStateUtil.cs
- TypeElement.cs
- HotSpotCollection.cs
- iisPickupDirectory.cs
- MsmqIntegrationSecurityElement.cs
- BrowserDefinitionCollection.cs
- HtmlElementCollection.cs
- ScriptReferenceBase.cs
- autovalidator.cs
- ClientFactory.cs
- ContextDataSourceView.cs
- PropertyFilterAttribute.cs
- XmlSchemaAnnotation.cs
- DataService.cs
- propertyentry.cs