Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ListView.cs
- WebPartCatalogAddVerb.cs
- XpsResourceDictionary.cs
- XPathSingletonIterator.cs
- ConnectionManagementElement.cs
- ArgumentValueSerializer.cs
- SessionStateSection.cs
- BCLDebug.cs
- TextElementEditingBehaviorAttribute.cs
- SpeechSynthesizer.cs
- ProtocolsSection.cs
- EncryptedPackageFilter.cs
- GridViewColumnCollection.cs
- WorkflowViewManager.cs
- QueryMath.cs
- SQLInt32Storage.cs
- SqlCachedBuffer.cs
- PartialCachingControl.cs
- JapaneseLunisolarCalendar.cs
- BitmapEffectInputData.cs
- SubtreeProcessor.cs
- ToolStripScrollButton.cs
- WCFBuildProvider.cs
- DocumentPageViewAutomationPeer.cs
- DataControlPagerLinkButton.cs
- LinkedList.cs
- InstanceStore.cs
- KerberosReceiverSecurityToken.cs
- TrackingProvider.cs
- DBConcurrencyException.cs
- Memoizer.cs
- FillBehavior.cs
- DesignerTransactionCloseEvent.cs
- RectAnimation.cs
- DataGridRelationshipRow.cs
- XslException.cs
- SecurityBindingElement.cs
- NumericExpr.cs
- ObjectParameter.cs
- DbConnectionHelper.cs
- SelectionChangedEventArgs.cs
- WhereQueryOperator.cs
- NameService.cs
- NetSectionGroup.cs
- UpdateTracker.cs
- EntityCommandDefinition.cs
- CallbackException.cs
- CaseCqlBlock.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- WriteTimeStream.cs
- ProfileProvider.cs
- Update.cs
- MessageQueuePermissionAttribute.cs
- TemplateBaseAction.cs
- SerializerDescriptor.cs
- FontCollection.cs
- Rectangle.cs
- ConfigurationCollectionAttribute.cs
- HostingEnvironmentSection.cs
- ListViewPagedDataSource.cs
- DoubleAnimationClockResource.cs
- BaseCollection.cs
- FormClosedEvent.cs
- CheckBoxStandardAdapter.cs
- DiffuseMaterial.cs
- RouteValueDictionary.cs
- TabControlToolboxItem.cs
- ToolboxItemFilterAttribute.cs
- XPathMultyIterator.cs
- UserControlFileEditor.cs
- PasswordDeriveBytes.cs
- KnownTypesProvider.cs
- DocumentViewerConstants.cs
- PathSegmentCollection.cs
- StylusPointCollection.cs
- NotCondition.cs
- TextEffectResolver.cs
- TypedAsyncResult.cs
- SafePipeHandle.cs
- MenuEventArgs.cs
- AnnotationDocumentPaginator.cs
- Composition.cs
- KeyMatchBuilder.cs
- MailDefinition.cs
- RemoveStoryboard.cs
- OutOfProcStateClientManager.cs
- AnnotationComponentManager.cs
- ProxyWebPartConnectionCollection.cs
- ConfigurationManagerInternalFactory.cs
- ValueQuery.cs
- RuntimeComponentFilter.cs
- Hash.cs
- MetadataUtilsSmi.cs
- RemoteArgument.cs
- BamlResourceContent.cs
- AttachmentCollection.cs
- CachedBitmap.cs
- RemoteWebConfigurationHost.cs
- CustomAttributeFormatException.cs
- ProtectedConfigurationSection.cs