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
- UnsafeNativeMethodsCLR.cs
- EndpointDiscoveryMetadata11.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ProgressBar.cs
- RegexCompilationInfo.cs
- BaseUriHelper.cs
- OleDbWrapper.cs
- TimeSpanSecondsConverter.cs
- FlowDocumentView.cs
- Transform.cs
- GrammarBuilderRuleRef.cs
- ParameterBuilder.cs
- Rotation3DAnimationBase.cs
- BypassElement.cs
- SafeThemeHandle.cs
- ToolBarButton.cs
- OdbcCommand.cs
- SafeBitVector32.cs
- ContentType.cs
- BitmapDownload.cs
- SubtreeProcessor.cs
- ImmComposition.cs
- Timeline.cs
- DecodeHelper.cs
- Point.cs
- HtmlElementEventArgs.cs
- RectAnimationBase.cs
- TextRangeSerialization.cs
- ImageList.cs
- _LoggingObject.cs
- ResourceDefaultValueAttribute.cs
- IsolationInterop.cs
- Button.cs
- CompilerResults.cs
- ToolStripPanelRow.cs
- SqlConnectionPoolGroupProviderInfo.cs
- FrameworkTextComposition.cs
- MgmtResManager.cs
- ObjectDataSourceView.cs
- ContextMenuAutomationPeer.cs
- EntityContainerEntitySetDefiningQuery.cs
- GridViewSortEventArgs.cs
- SignatureTargetIdManager.cs
- RetriableClipboard.cs
- DataRow.cs
- PartManifestEntry.cs
- TrustManagerPromptUI.cs
- CapiSafeHandles.cs
- Drawing.cs
- Queue.cs
- SizeValueSerializer.cs
- ValidatingPropertiesEventArgs.cs
- StatusBar.cs
- SudsWriter.cs
- SurrogateSelector.cs
- SafeArchiveContext.cs
- ToolStripDropDownItem.cs
- ApplicationDirectory.cs
- QueryableDataSourceEditData.cs
- TableStyle.cs
- PolicyUnit.cs
- CompoundFileDeflateTransform.cs
- SimpleType.cs
- TraceRecord.cs
- Soap.cs
- ProgressBar.cs
- HtmlShimManager.cs
- OleDbParameter.cs
- CalendarItem.cs
- Binding.cs
- DataServiceException.cs
- EdmComplexTypeAttribute.cs
- ReflectionUtil.cs
- SystemIPv6InterfaceProperties.cs
- WorkflowRuntimeEndpoint.cs
- SpecialTypeDataContract.cs
- RightsManagementInformation.cs
- CmsInterop.cs
- DocumentPaginator.cs
- LinkButton.cs
- HitTestResult.cs
- Domain.cs
- SmtpFailedRecipientsException.cs
- ServiceBuildProvider.cs
- MimeMapping.cs
- SafeNativeMethodsOther.cs
- NodeCounter.cs
- Cursor.cs
- Events.cs
- IODescriptionAttribute.cs
- SqlCommandSet.cs
- DataGridViewTopLeftHeaderCell.cs
- XmlWrappingReader.cs
- ContextMenuAutomationPeer.cs
- PathSegment.cs
- HashHelper.cs
- PerformanceCounterPermission.cs
- PathSegment.cs
- WebPartCloseVerb.cs
- EpmCustomContentWriterNodeData.cs