Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigXmlReader.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DependencyObjectCodeDomSerializer.cs
- Page.cs
- BuildProvider.cs
- RC2CryptoServiceProvider.cs
- ViewRendering.cs
- StyleXamlTreeBuilder.cs
- remotingproxy.cs
- XamlTemplateSerializer.cs
- Transactions.cs
- ProcessHostFactoryHelper.cs
- TypefaceCollection.cs
- KoreanCalendar.cs
- ValidateNames.cs
- Vector3DValueSerializer.cs
- HtmlInputText.cs
- _StreamFramer.cs
- ILGen.cs
- AutoGeneratedFieldProperties.cs
- CatalogZoneBase.cs
- OverflowException.cs
- URI.cs
- BaseComponentEditor.cs
- clipboard.cs
- JsonFormatGeneratorStatics.cs
- HandlerMappingMemo.cs
- CookieParameter.cs
- TextServicesProperty.cs
- ListItemConverter.cs
- XmlSignificantWhitespace.cs
- PenCursorManager.cs
- UIElementCollection.cs
- PlatformNotSupportedException.cs
- XmlSchemaSet.cs
- WebPageTraceListener.cs
- FixedSOMImage.cs
- RectKeyFrameCollection.cs
- DataGridViewUtilities.cs
- BindingContext.cs
- DataGridViewRowEventArgs.cs
- RemotingConfiguration.cs
- BasicSecurityProfileVersion.cs
- RelationshipEndCollection.cs
- Properties.cs
- DelayedRegex.cs
- XmlUtil.cs
- DataGridViewRowStateChangedEventArgs.cs
- DataContractSerializerFaultFormatter.cs
- PrimitiveSchema.cs
- TargetConverter.cs
- TitleStyle.cs
- UTF8Encoding.cs
- ListViewItemSelectionChangedEvent.cs
- EmissiveMaterial.cs
- ItemsPanelTemplate.cs
- NativeObjectSecurity.cs
- Errors.cs
- InputReport.cs
- ApplicationBuildProvider.cs
- DiscardableAttribute.cs
- SessionStateContainer.cs
- Speller.cs
- Tokenizer.cs
- FormViewPagerRow.cs
- XamlTypeMapper.cs
- ChtmlTextWriter.cs
- cookie.cs
- NavigateEvent.cs
- XmlResolver.cs
- HostingEnvironment.cs
- BufferModesCollection.cs
- ProfileProvider.cs
- HttpVersion.cs
- UIElement.cs
- Ops.cs
- XmlIncludeAttribute.cs
- ComponentSerializationService.cs
- URLAttribute.cs
- WebAdminConfigurationHelper.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- XmlSerializerOperationGenerator.cs
- ButtonBaseAdapter.cs
- TabItem.cs
- ResourceDisplayNameAttribute.cs
- SoapIncludeAttribute.cs
- CookieProtection.cs
- SqlRecordBuffer.cs
- AttributeProviderAttribute.cs
- NativeMethods.cs
- InvalidOperationException.cs
- WindowsTitleBar.cs
- Privilege.cs
- SoapAttributeAttribute.cs
- TreeNodeCollection.cs
- QueryAsyncResult.cs
- ArgumentException.cs
- GroupJoinQueryOperator.cs
- DependencyPropertyKey.cs
- SHA1Cng.cs
- CheckedListBox.cs
- BooleanExpr.cs