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
- SoapFault.cs
- AxWrapperGen.cs
- PanelStyle.cs
- DesignerHierarchicalDataSourceView.cs
- ImportContext.cs
- CommandArguments.cs
- ImmutableAssemblyCacheEntry.cs
- HttpHandlerAction.cs
- UIElementParagraph.cs
- BooleanStorage.cs
- validationstate.cs
- BeginGetFileNameFromUserRequest.cs
- PrintPreviewControl.cs
- PenThreadPool.cs
- Convert.cs
- SqlNotificationRequest.cs
- XmlNullResolver.cs
- DbParameterHelper.cs
- bidPrivateBase.cs
- ItemCheckEvent.cs
- TabPanel.cs
- DropShadowBitmapEffect.cs
- DelegateHelpers.cs
- AuthenticationServiceManager.cs
- TableRowGroup.cs
- ConfigViewGenerator.cs
- Light.cs
- FontSizeConverter.cs
- SiteOfOriginContainer.cs
- RegexCaptureCollection.cs
- FacetChecker.cs
- Helpers.cs
- DictionarySurrogate.cs
- SystemNetworkInterface.cs
- PopupEventArgs.cs
- PrintingPermissionAttribute.cs
- TextTreeInsertElementUndoUnit.cs
- SqlDataReaderSmi.cs
- MaskDescriptors.cs
- WebControlsSection.cs
- ChannelManager.cs
- CollectionViewGroupRoot.cs
- GlyphInfoList.cs
- X509CertificateChain.cs
- DoubleLinkList.cs
- IDQuery.cs
- OrCondition.cs
- ThaiBuddhistCalendar.cs
- ConstraintEnumerator.cs
- XPathNodeInfoAtom.cs
- HttpResponse.cs
- XmlBinaryReader.cs
- ListViewInsertionMark.cs
- InfoCardKeyedHashAlgorithm.cs
- BuildDependencySet.cs
- WebPartDescription.cs
- CultureMapper.cs
- ScrollBar.cs
- FlowPosition.cs
- EntityDataSourceQueryBuilder.cs
- ContextMenuAutomationPeer.cs
- XmlLanguageConverter.cs
- DesignerTextBoxAdapter.cs
- Crc32.cs
- Menu.cs
- ControlParameter.cs
- ConsoleTraceListener.cs
- ColumnMapCopier.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- RemoteWebConfigurationHostStream.cs
- SettingsBindableAttribute.cs
- SystemFonts.cs
- SHA256Cng.cs
- MeasureItemEvent.cs
- SqlBulkCopyColumnMappingCollection.cs
- Int32Rect.cs
- FieldDescriptor.cs
- UnsafeNativeMethods.cs
- CustomLineCap.cs
- listviewsubitemcollectioneditor.cs
- WeakEventTable.cs
- ConfigurationManagerInternalFactory.cs
- CompoundFileStreamReference.cs
- ByteStreamMessageEncodingElement.cs
- PartitionedStream.cs
- NullableBoolConverter.cs
- XamlRtfConverter.cs
- EventDriven.cs
- XmlAttributeCache.cs
- ForeignConstraint.cs
- DesignerUtils.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- ContentPresenter.cs
- Brush.cs
- FormViewModeEventArgs.cs
- Material.cs
- StreamResourceInfo.cs
- GenericTypeParameterBuilder.cs
- Filter.cs
- ObjectAssociationEndMapping.cs