Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- MatchAllMessageFilter.cs
- Compilation.cs
- InvokeWebService.cs
- NullableBoolConverter.cs
- MessageSmuggler.cs
- AstTree.cs
- OracleSqlParser.cs
- SqlAliasesReferenced.cs
- Identity.cs
- FormsAuthenticationUser.cs
- PropertyValueUIItem.cs
- ExpandSegment.cs
- SemanticKeyElement.cs
- ColorPalette.cs
- BamlLocalizableResource.cs
- DeclarativeCatalogPart.cs
- SqlDataSourceConfigureFilterForm.cs
- ApplicationFileCodeDomTreeGenerator.cs
- MouseGesture.cs
- XpsViewerException.cs
- ErrorFormatter.cs
- HtmlTextViewAdapter.cs
- FullTextBreakpoint.cs
- Select.cs
- BaseInfoTable.cs
- DataGridHeaderBorder.cs
- shaperfactoryquerycacheentry.cs
- QilTypeChecker.cs
- DrawListViewItemEventArgs.cs
- HwndSourceParameters.cs
- Hash.cs
- TypedTableGenerator.cs
- RegexGroup.cs
- DescendantOverDescendantQuery.cs
- LayoutEngine.cs
- CriticalFinalizerObject.cs
- ContextDataSource.cs
- SHA1CryptoServiceProvider.cs
- FormViewPageEventArgs.cs
- RoutedPropertyChangedEventArgs.cs
- PointConverter.cs
- webbrowsersite.cs
- AssemblyName.cs
- SQLCharsStorage.cs
- XamlTreeBuilderBamlRecordWriter.cs
- Pen.cs
- ScaleTransform.cs
- DataRowView.cs
- UdpTransportBindingElement.cs
- RangeValueProviderWrapper.cs
- GeneralTransform3DGroup.cs
- ConfigurationConverterBase.cs
- NewArrayExpression.cs
- StatusBarAutomationPeer.cs
- SafeReadContext.cs
- AvtEvent.cs
- CurrencyWrapper.cs
- AdRotator.cs
- Point3DKeyFrameCollection.cs
- nulltextnavigator.cs
- WizardPanelChangingEventArgs.cs
- SoapSchemaMember.cs
- SoapEnumAttribute.cs
- PersonalizationStateInfoCollection.cs
- SoapEnumAttribute.cs
- ChtmlSelectionListAdapter.cs
- ImageConverter.cs
- IDReferencePropertyAttribute.cs
- CategoryGridEntry.cs
- ByteFacetDescriptionElement.cs
- TerminateSequence.cs
- MessageLogTraceRecord.cs
- MulticastNotSupportedException.cs
- RadioButton.cs
- XmlReflectionImporter.cs
- querybuilder.cs
- MouseWheelEventArgs.cs
- WindowsProgressbar.cs
- DocumentPageHost.cs
- TextFormatterHost.cs
- TypeLoader.cs
- XmlResolver.cs
- CodeGeneratorOptions.cs
- Propagator.Evaluator.cs
- HtmlImage.cs
- SessionStateContainer.cs
- UseLicense.cs
- DataControlImageButton.cs
- ExtentCqlBlock.cs
- HttpCookie.cs
- RegexFCD.cs
- RegisteredDisposeScript.cs
- PolicyChain.cs
- LocalFileSettingsProvider.cs
- _TransmitFileOverlappedAsyncResult.cs
- CheckBoxAutomationPeer.cs
- OdbcConnectionString.cs
- CustomMenuItemCollection.cs
- Ref.cs
- DelegateBodyWriter.cs