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
- QfeChecker.cs
- CodeDirectionExpression.cs
- ActivationWorker.cs
- ListItemsPage.cs
- CngProvider.cs
- HashCodeCombiner.cs
- NameSpaceEvent.cs
- SmtpDateTime.cs
- InputBuffer.cs
- TypeUnloadedException.cs
- StrokeCollectionConverter.cs
- TabPanel.cs
- ConfigurationConverterBase.cs
- TheQuery.cs
- DictionaryChange.cs
- _ShellExpression.cs
- MethodCallExpression.cs
- WebPartDisplayModeEventArgs.cs
- CngProvider.cs
- XmlSchemaComplexType.cs
- GraphicsState.cs
- PlaceHolder.cs
- Size.cs
- EntityDataSourceReferenceGroup.cs
- IndentedWriter.cs
- TransactionScopeDesigner.cs
- MetadataSource.cs
- EndpointAddressMessageFilter.cs
- StructuralType.cs
- ServicePoint.cs
- BackoffTimeoutHelper.cs
- SettingsAttributeDictionary.cs
- Application.cs
- __Filters.cs
- TimerElapsedEvenArgs.cs
- DataBoundLiteralControl.cs
- InheritanceAttribute.cs
- MailMessageEventArgs.cs
- XmlDataSourceView.cs
- VoiceObjectToken.cs
- ImageCodecInfoPrivate.cs
- SelectorAutomationPeer.cs
- PrintPreviewDialog.cs
- IItemContainerGenerator.cs
- TempFiles.cs
- TabControlEvent.cs
- FromReply.cs
- BamlResourceDeserializer.cs
- DrawingCollection.cs
- WebPartDisplayModeCollection.cs
- ServiceOperationParameter.cs
- ContentValidator.cs
- SoapExtensionTypeElement.cs
- VectorKeyFrameCollection.cs
- EndpointDiscoveryMetadataCD1.cs
- recordstatescratchpad.cs
- CompositeClientFormatter.cs
- QueryContinueDragEventArgs.cs
- InvokePatternIdentifiers.cs
- PerformanceCounters.cs
- GuidelineSet.cs
- Authorization.cs
- DispatchProxy.cs
- SafeBitVector32.cs
- SecurityUtils.cs
- RemotingConfigParser.cs
- EllipticalNodeOperations.cs
- ApplicationBuildProvider.cs
- SafeFileMappingHandle.cs
- HttpSysSettings.cs
- CheckBox.cs
- AuthenticodeSignatureInformation.cs
- RegexNode.cs
- Publisher.cs
- SqlBuilder.cs
- CustomErrorsSectionWrapper.cs
- IndependentAnimationStorage.cs
- TreeSet.cs
- Line.cs
- BaseProcessor.cs
- MsmqTransportSecurityElement.cs
- UICuesEvent.cs
- FixedDocumentPaginator.cs
- Activator.cs
- UnsafeNativeMethods.cs
- DataComponentNameHandler.cs
- TransformedBitmap.cs
- RunClient.cs
- LocalizableResourceBuilder.cs
- VersionedStreamOwner.cs
- Roles.cs
- SqlMethodAttribute.cs
- XmlAttributeCollection.cs
- TrayIconDesigner.cs
- QueryableDataSourceView.cs
- CalendarDataBindingHandler.cs
- TextCompositionEventArgs.cs
- XmlCharCheckingReader.cs
- ObservableCollectionDefaultValueFactory.cs
- SqlNode.cs