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
- TraceContextEventArgs.cs
- RTLAwareMessageBox.cs
- ElementAction.cs
- HtmlImage.cs
- MD5CryptoServiceProvider.cs
- XmlTextReaderImplHelpers.cs
- PrincipalPermission.cs
- EntityDataSourceSelectingEventArgs.cs
- CompensatableSequenceActivity.cs
- XsltOutput.cs
- CodeDelegateInvokeExpression.cs
- DataBoundLiteralControl.cs
- Int64Animation.cs
- RegexCompiler.cs
- UDPClient.cs
- FormsAuthenticationUserCollection.cs
- IPEndPointCollection.cs
- GrammarBuilderPhrase.cs
- BitmapEffectInput.cs
- TextPointer.cs
- XmlTextReader.cs
- BeginSelectCardRequest.cs
- ToolStripSettings.cs
- WorkflowInvoker.cs
- RoleServiceManager.cs
- Clipboard.cs
- SqlTriggerContext.cs
- SrgsDocument.cs
- AssociationSet.cs
- SocketAddress.cs
- PkcsMisc.cs
- Section.cs
- ClusterRegistryConfigurationProvider.cs
- JavaScriptString.cs
- WorkflowControlEndpoint.cs
- Crc32Helper.cs
- AliasedSlot.cs
- DataDocumentXPathNavigator.cs
- SaveFileDialog.cs
- ErrorTableItemStyle.cs
- ValidationSummaryDesigner.cs
- ExtensionFile.cs
- PersonalizationStateInfoCollection.cs
- SerializationFieldInfo.cs
- TextPatternIdentifiers.cs
- Variant.cs
- RegexCode.cs
- ReflectionUtil.cs
- GPRECTF.cs
- PersonalizableAttribute.cs
- BinaryWriter.cs
- RenameRuleObjectDialog.cs
- UnaryNode.cs
- RegexWorker.cs
- ProfileSettingsCollection.cs
- WebConfigurationHost.cs
- Rect3D.cs
- ColorInterpolationModeValidation.cs
- ItemsControl.cs
- ViewgenGatekeeper.cs
- GetPageCompletedEventArgs.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- EdmRelationshipRoleAttribute.cs
- ECDsa.cs
- InheritablePropertyChangeInfo.cs
- Graphics.cs
- Emitter.cs
- DBSchemaTable.cs
- ScriptRef.cs
- TemplateColumn.cs
- ReadOnlyPropertyMetadata.cs
- UIElementCollection.cs
- ObjectDisposedException.cs
- HtmlEncodedRawTextWriter.cs
- MetadataProperty.cs
- DataReceivedEventArgs.cs
- AssemblyAssociatedContentFileAttribute.cs
- StreamReader.cs
- OpenTypeLayout.cs
- CaseStatement.cs
- UserNameSecurityTokenAuthenticator.cs
- XsltLoader.cs
- PauseStoryboard.cs
- AnnotationComponentManager.cs
- NonValidatingSecurityTokenAuthenticator.cs
- AnimatedTypeHelpers.cs
- BindingRestrictions.cs
- DigitShape.cs
- ProfileSettings.cs
- PropertyNames.cs
- VisualTreeHelper.cs
- RefreshEventArgs.cs
- LongAverageAggregationOperator.cs
- SqlConnectionString.cs
- BindToObject.cs
- UIElement3D.cs
- TableSectionStyle.cs
- CollectionBase.cs
- Separator.cs
- WebRequestModuleElementCollection.cs