Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- CssStyleCollection.cs
- ToolStripManager.cs
- DataServiceRequestOfT.cs
- IsolatedStorageFilePermission.cs
- FixedTextBuilder.cs
- _KerberosClient.cs
- ExpressionLexer.cs
- MaskDescriptors.cs
- AccessViolationException.cs
- SessionStateItemCollection.cs
- PeerObject.cs
- BitmapData.cs
- ThemeDictionaryExtension.cs
- TreeViewDesigner.cs
- _HTTPDateParse.cs
- processwaithandle.cs
- ConfigurationSettings.cs
- LogManagementAsyncResult.cs
- Schema.cs
- QueryPrefixOp.cs
- UTF7Encoding.cs
- WebPartConnectionsCloseVerb.cs
- BulletedList.cs
- BeginCreateSecurityTokenRequest.cs
- SHA256.cs
- sqlinternaltransaction.cs
- SwitchAttribute.cs
- ClientTarget.cs
- EntityClientCacheKey.cs
- CompilerCollection.cs
- TreeViewBindingsEditorForm.cs
- FactoryGenerator.cs
- UIInitializationException.cs
- CollectionViewGroupInternal.cs
- IndexObject.cs
- XsdBuildProvider.cs
- LinqExpressionNormalizer.cs
- PropertyInformationCollection.cs
- SmiEventStream.cs
- PersonalizationProviderHelper.cs
- ChangesetResponse.cs
- VBIdentifierDesigner.xaml.cs
- FilterUserControlBase.cs
- InstanceCompleteException.cs
- EventSetter.cs
- EnumDataContract.cs
- ProfileServiceManager.cs
- MarkupWriter.cs
- DictationGrammar.cs
- HwndProxyElementProvider.cs
- SqlTriggerContext.cs
- DataPagerFieldCommandEventArgs.cs
- DataSysAttribute.cs
- DataGridViewSortCompareEventArgs.cs
- IdleTimeoutMonitor.cs
- SkinBuilder.cs
- SessionIDManager.cs
- ClrPerspective.cs
- PersonalizationStateQuery.cs
- SqlDeflator.cs
- SvcMapFile.cs
- TextDecoration.cs
- WebPartConnectVerb.cs
- TextBox.cs
- Variable.cs
- TraceRecord.cs
- DecimalAnimationBase.cs
- DoubleUtil.cs
- CheckBoxDesigner.cs
- IndentedWriter.cs
- WS2007HttpBindingElement.cs
- MsmqInputChannel.cs
- BamlLocalizer.cs
- ContextMarshalException.cs
- DLinqAssociationProvider.cs
- Touch.cs
- EditingMode.cs
- SafeEventHandle.cs
- CqlQuery.cs
- UpdatePanelTriggerCollection.cs
- RelatedImageListAttribute.cs
- Config.cs
- ComplexLine.cs
- ComponentManagerBroker.cs
- Matrix3DConverter.cs
- DefaultTraceListener.cs
- Globals.cs
- XPathParser.cs
- ISO2022Encoding.cs
- ProviderMetadataCachedInformation.cs
- InertiaTranslationBehavior.cs
- cookiecollection.cs
- BufferedGraphicsManager.cs
- XmlSchemaGroup.cs
- ObjectConverter.cs
- DesignerView.cs
- RegistrationServices.cs
- FormsAuthenticationTicket.cs
- ListBoxItemWrapperAutomationPeer.cs
- GuidConverter.cs