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
- WebCodeGenerator.cs
- StreamHelper.cs
- LastQueryOperator.cs
- XmlSchemaProviderAttribute.cs
- Vector3DIndependentAnimationStorage.cs
- HttpRequest.cs
- GetPageCompletedEventArgs.cs
- TextParagraph.cs
- mongolianshape.cs
- ECDsaCng.cs
- OfTypeExpression.cs
- BamlRecordReader.cs
- TreeWalkHelper.cs
- SafeRightsManagementSessionHandle.cs
- DesignerVerb.cs
- MenuBase.cs
- BasicHttpBindingCollectionElement.cs
- ListBoxAutomationPeer.cs
- InvalidAsynchronousStateException.cs
- LayoutEditorPart.cs
- EllipseGeometry.cs
- IIS7UserPrincipal.cs
- ActivityExecutorSurrogate.cs
- Socket.cs
- ResourceManager.cs
- DataGridTable.cs
- TransactionContextManager.cs
- HMACSHA1.cs
- SerialPinChanges.cs
- ValidatedMobileControlConverter.cs
- ToolStripMenuItem.cs
- ResourcesBuildProvider.cs
- SaveFileDialog.cs
- WizardStepBase.cs
- GridEntryCollection.cs
- VirtualizingPanel.cs
- ErrorRuntimeConfig.cs
- ClockGroup.cs
- SQLDecimalStorage.cs
- OleDbDataAdapter.cs
- ImpersonateTokenRef.cs
- ListViewDeleteEventArgs.cs
- TextBoxView.cs
- PopupEventArgs.cs
- HwndMouseInputProvider.cs
- TextLineBreak.cs
- IdentityHolder.cs
- CaretElement.cs
- HttpCacheVary.cs
- SkewTransform.cs
- RequestBringIntoViewEventArgs.cs
- HttpModuleAction.cs
- SByte.cs
- TextTreeTextBlock.cs
- EditingMode.cs
- FlowPanelDesigner.cs
- CompositeDataBoundControl.cs
- SendMailErrorEventArgs.cs
- ClientFactory.cs
- CanExecuteRoutedEventArgs.cs
- DbDataAdapter.cs
- ChtmlTextBoxAdapter.cs
- InteropAutomationProvider.cs
- SafeMILHandleMemoryPressure.cs
- PointCollection.cs
- PersonalizableTypeEntry.cs
- BrowserCapabilitiesFactoryBase.cs
- ArraySet.cs
- ReferenceEqualityComparer.cs
- EntityDesignerUtils.cs
- ValueHandle.cs
- Transform3DGroup.cs
- DetailsViewPageEventArgs.cs
- ApplicationActivator.cs
- CalculatedColumn.cs
- SchemaType.cs
- TemplateGroupCollection.cs
- DataControlFieldCell.cs
- CodeNamespaceImport.cs
- MarkedHighlightComponent.cs
- ObjectSpanRewriter.cs
- QuadraticBezierSegment.cs
- Serializer.cs
- BindUriHelper.cs
- Visual3DCollection.cs
- ExtendedProtectionPolicyElement.cs
- RegexMatchCollection.cs
- LiteralTextParser.cs
- HttpListenerRequest.cs
- ConnectionsZone.cs
- ProcessHostServerConfig.cs
- MenuItem.cs
- Query.cs
- QueueSurrogate.cs
- Line.cs
- SamlSerializer.cs
- VirtualizingPanel.cs
- ApplicationBuildProvider.cs
- PermissionListSet.cs
- ByteStreamGeometryContext.cs