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
- BindingValueChangedEventArgs.cs
- ByteStorage.cs
- rsa.cs
- DeviceOverridableAttribute.cs
- HtmlValidatorAdapter.cs
- TableLayoutCellPaintEventArgs.cs
- TemplateLookupAction.cs
- AspNetSynchronizationContext.cs
- _KerberosClient.cs
- GeneralTransformGroup.cs
- SpanIndex.cs
- ConfigsHelper.cs
- _ConnectionGroup.cs
- WindowsListViewSubItem.cs
- UrlParameterWriter.cs
- EdmProperty.cs
- UnauthorizedAccessException.cs
- InfoCardHelper.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- InternalSafeNativeMethods.cs
- PropertyFilterAttribute.cs
- MetadataArtifactLoaderComposite.cs
- WarningException.cs
- MinimizableAttributeTypeConverter.cs
- ExceptionUtil.cs
- ErrorActivity.cs
- DesignerAttribute.cs
- XmlNamespaceMapping.cs
- WebPartMinimizeVerb.cs
- EventMappingSettingsCollection.cs
- MenuStrip.cs
- HealthMonitoringSectionHelper.cs
- CustomCategoryAttribute.cs
- LoginName.cs
- ContainerControl.cs
- ScrollViewerAutomationPeer.cs
- PolicyStatement.cs
- AsyncOperationManager.cs
- ImageAttributes.cs
- activationcontext.cs
- MarginCollapsingState.cs
- TranslateTransform.cs
- TrackingCondition.cs
- KeyMatchBuilder.cs
- XhtmlConformanceSection.cs
- BaseProcessor.cs
- DataGridViewComboBoxColumn.cs
- LambdaCompiler.Address.cs
- XmlSchemaParticle.cs
- CalendarDateChangedEventArgs.cs
- ListBindingHelper.cs
- XmlSchemaIdentityConstraint.cs
- FixedPosition.cs
- WebConfigurationFileMap.cs
- PrivateFontCollection.cs
- SqlBuilder.cs
- Triangle.cs
- SourceFileBuildProvider.cs
- EndpointDiscoveryMetadata11.cs
- CodeRegionDirective.cs
- HelpOperationInvoker.cs
- AssemblyUtil.cs
- TextEndOfSegment.cs
- FixUpCollection.cs
- SelectionProcessor.cs
- StrokeDescriptor.cs
- ActivityCodeDomSerializer.cs
- SQLBinary.cs
- TreeViewImageKeyConverter.cs
- MemberPathMap.cs
- DataTableMappingCollection.cs
- FixedFlowMap.cs
- SpoolingTaskBase.cs
- UserControlCodeDomTreeGenerator.cs
- DataTableReader.cs
- SystemWebCachingSectionGroup.cs
- CodeMemberEvent.cs
- DataFormats.cs
- CaseInsensitiveHashCodeProvider.cs
- QueryOptionExpression.cs
- XmlSchemaSimpleTypeRestriction.cs
- EDesignUtil.cs
- DictionaryEntry.cs
- ReadOnlyTernaryTree.cs
- CommonGetThemePartSize.cs
- GridViewRow.cs
- Label.cs
- SuspendDesigner.cs
- Wildcard.cs
- Console.cs
- TextEffect.cs
- FixedSOMTextRun.cs
- PointLight.cs
- Profiler.cs
- PermissionListSet.cs
- TranslateTransform3D.cs
- TabControl.cs
- DataGridViewRowsAddedEventArgs.cs
- ConfigurationManagerInternalFactory.cs
- _ProxyRegBlob.cs