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
- RepeatInfo.cs
- BindStream.cs
- TTSEvent.cs
- SqlUtil.cs
- UserInitiatedNavigationPermission.cs
- DataGridViewLayoutData.cs
- CharEnumerator.cs
- InfoCardSymmetricCrypto.cs
- MetadataSerializer.cs
- IgnoreFileBuildProvider.cs
- IntranetCredentialPolicy.cs
- WindowsAuthenticationEventArgs.cs
- QueryReaderSettings.cs
- CubicEase.cs
- DependencyPropertyKind.cs
- TokenBasedSetEnumerator.cs
- IntSecurity.cs
- FrameworkContentElementAutomationPeer.cs
- ToolStripItem.cs
- GroupedContextMenuStrip.cs
- MaskedTextProvider.cs
- ProtocolInformationWriter.cs
- KeySplineConverter.cs
- RuntimeIdentifierPropertyAttribute.cs
- QueryTreeBuilder.cs
- SoapSchemaExporter.cs
- MemoryMappedViewStream.cs
- XmlWrappingReader.cs
- StateManagedCollection.cs
- StretchValidation.cs
- entitydatasourceentitysetnameconverter.cs
- GuidelineCollection.cs
- RoleGroup.cs
- SoapSchemaImporter.cs
- EraserBehavior.cs
- BitmapVisualManager.cs
- Size3DValueSerializer.cs
- ProxyWebPart.cs
- SHA512Managed.cs
- SettingsPropertyWrongTypeException.cs
- BamlResourceSerializer.cs
- TimeSpanHelper.cs
- ErrorWebPart.cs
- OleDbTransaction.cs
- DocumentGridContextMenu.cs
- Selection.cs
- File.cs
- SchemaNames.cs
- ExpressionNode.cs
- HelpInfo.cs
- WindowsGraphics.cs
- DataTableReaderListener.cs
- EntityDataSourceChangingEventArgs.cs
- DeclaredTypeElement.cs
- XmlSchemaAppInfo.cs
- HttpListenerContext.cs
- WbemProvider.cs
- Types.cs
- Internal.cs
- xmlfixedPageInfo.cs
- RawKeyboardInputReport.cs
- RecommendedAsConfigurableAttribute.cs
- DropShadowBitmapEffect.cs
- SqlInternalConnection.cs
- XmlSchemaElement.cs
- AsymmetricSignatureFormatter.cs
- RoutedEventArgs.cs
- FreezableCollection.cs
- DbDeleteCommandTree.cs
- xmlformatgeneratorstatics.cs
- DBCommandBuilder.cs
- DataTableCollection.cs
- SevenBitStream.cs
- ExpressionCopier.cs
- WebPartHelpVerb.cs
- SqlProfileProvider.cs
- PermissionRequestEvidence.cs
- Reference.cs
- StateMachineDesignerPaint.cs
- httpstaticobjectscollection.cs
- TreeBuilderXamlTranslator.cs
- BaseServiceProvider.cs
- RectangleConverter.cs
- StatusStrip.cs
- PageParserFilter.cs
- Light.cs
- IgnoreDeviceFilterElementCollection.cs
- SessionStateSection.cs
- AtomPub10CategoriesDocumentFormatter.cs
- StreamUpdate.cs
- RangeValueProviderWrapper.cs
- activationcontext.cs
- NotFiniteNumberException.cs
- RewritingValidator.cs
- EditorBrowsableAttribute.cs
- SymbolTable.cs
- CompositeCollection.cs
- TokenizerHelper.cs
- IItemProperties.cs
- DrawingImage.cs