Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigXmlReader.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TabRenderer.cs
- ConnectionModeReader.cs
- DataGridViewCellStyleChangedEventArgs.cs
- BCryptNative.cs
- ExceptionHelpers.cs
- WebPartEditVerb.cs
- RSATokenProvider.cs
- TransportationConfigurationTypeInstallComponent.cs
- CustomErrorsSectionWrapper.cs
- ToolStripDropDownClosingEventArgs.cs
- Int16Converter.cs
- CodeAttributeDeclaration.cs
- ViewLoader.cs
- Visual3D.cs
- WebPartCollection.cs
- BitmapEffect.cs
- ContentPresenter.cs
- CharUnicodeInfo.cs
- WebPartDisplayModeEventArgs.cs
- InputScope.cs
- JsonWriter.cs
- WebReferencesBuildProvider.cs
- InlineCollection.cs
- ResourcePermissionBaseEntry.cs
- BinaryObjectInfo.cs
- SHA256CryptoServiceProvider.cs
- CheckBoxRenderer.cs
- ConnectionPoint.cs
- SyndicationPerson.cs
- MulticastIPAddressInformationCollection.cs
- TextClipboardData.cs
- AssertSection.cs
- TrackBar.cs
- InheritablePropertyChangeInfo.cs
- ClipboardProcessor.cs
- MemberAssignment.cs
- Resources.Designer.cs
- XmlAttributeCollection.cs
- PageRequestManager.cs
- ClassicBorderDecorator.cs
- QuadraticBezierSegment.cs
- ResolveMatchesApril2005.cs
- StorageInfo.cs
- Error.cs
- Crypto.cs
- GeometryHitTestResult.cs
- LocationSectionRecord.cs
- DataProtection.cs
- ConvertEvent.cs
- EnterpriseServicesHelper.cs
- XmlSerializerOperationFormatter.cs
- SerializationStore.cs
- QueryResponse.cs
- XmlSchemaInferenceException.cs
- ActiveXSerializer.cs
- ImageClickEventArgs.cs
- Descriptor.cs
- BamlTreeNode.cs
- Assembly.cs
- FixedPageStructure.cs
- ChangeProcessor.cs
- NetworkCredential.cs
- DiagnosticStrings.cs
- FlowLayoutPanel.cs
- LinqDataSourceUpdateEventArgs.cs
- ErrorStyle.cs
- ProcessInfo.cs
- SmiContext.cs
- XmlHierarchicalDataSourceView.cs
- ThousandthOfEmRealPoints.cs
- MetaTableHelper.cs
- DescendantQuery.cs
- PrintControllerWithStatusDialog.cs
- FontStretch.cs
- XmlCDATASection.cs
- UrlParameterWriter.cs
- SendMailErrorEventArgs.cs
- FloaterBaseParaClient.cs
- Operand.cs
- MorphHelper.cs
- BamlRecords.cs
- InputEventArgs.cs
- SqlDataSourceQueryEditor.cs
- MarshalDirectiveException.cs
- SqlRowUpdatedEvent.cs
- DesignColumn.cs
- IpcClientManager.cs
- BatchParser.cs
- UnsafeNativeMethodsTablet.cs
- CachedFontFamily.cs
- LinkButton.cs
- TextTreeDeleteContentUndoUnit.cs
- ImportCatalogPart.cs
- TextUtf8RawTextWriter.cs
- FormViewUpdateEventArgs.cs
- DataPagerField.cs
- UndoManager.cs
- SequentialActivityDesigner.cs
- ProgressPage.cs
- ItemCollection.cs