Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- VisualCollection.cs
- PcmConverter.cs
- DbMetaDataColumnNames.cs
- AutoResetEvent.cs
- Int32RectValueSerializer.cs
- RangeValidator.cs
- SponsorHelper.cs
- HttpContextServiceHost.cs
- TransactionScope.cs
- MaskedTextBox.cs
- PropertyConverter.cs
- Descriptor.cs
- DefaultTextStore.cs
- NativeMethods.cs
- OAVariantLib.cs
- PriorityItem.cs
- XmlDictionaryWriter.cs
- OwnerDrawPropertyBag.cs
- DataRowExtensions.cs
- SwitchLevelAttribute.cs
- ProviderException.cs
- HwndProxyElementProvider.cs
- Converter.cs
- HttpException.cs
- Application.cs
- ScrollBarRenderer.cs
- TimelineClockCollection.cs
- EditorAttributeInfo.cs
- HttpProxyTransportBindingElement.cs
- SelectedDatesCollection.cs
- ExceptionUtil.cs
- PerfCounters.cs
- Stackframe.cs
- _DisconnectOverlappedAsyncResult.cs
- StrongNameMembershipCondition.cs
- BooleanAnimationBase.cs
- DataGridHeaderBorder.cs
- NotifyIcon.cs
- SqlStatistics.cs
- DataGrid.cs
- NumberSubstitution.cs
- DesignerView.xaml.cs
- Path.cs
- HtmlTableCell.cs
- NullableIntAverageAggregationOperator.cs
- ToolboxItemLoader.cs
- OneOfTypeConst.cs
- XmlPropertyBag.cs
- ResXResourceWriter.cs
- CompositeDataBoundControl.cs
- _AuthenticationState.cs
- KeyEventArgs.cs
- DataTableMappingCollection.cs
- LayoutDump.cs
- SafeNativeMethodsOther.cs
- PagerSettings.cs
- PageThemeCodeDomTreeGenerator.cs
- NameValueFileSectionHandler.cs
- OleDbError.cs
- DictionaryEditChange.cs
- GenerateTemporaryTargetAssembly.cs
- EntityViewGenerationAttribute.cs
- EdmSchemaAttribute.cs
- OdbcConnectionString.cs
- Bits.cs
- EntitySetRetriever.cs
- UrlMapping.cs
- RuntimeWrappedException.cs
- RealProxy.cs
- ExpressionBindingsDialog.cs
- HttpListenerException.cs
- BuildResult.cs
- AuthenticationModuleElementCollection.cs
- OverlappedAsyncResult.cs
- AffineTransform3D.cs
- QilGenerator.cs
- TraceHandlerErrorFormatter.cs
- QueryCoreOp.cs
- EntityDataSourceContextCreatedEventArgs.cs
- WorkflowServiceBehavior.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- MimeMultiPart.cs
- DtrList.cs
- AvtEvent.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- Constants.cs
- ListViewGroupConverter.cs
- CanonicalXml.cs
- ExpressionParser.cs
- securestring.cs
- CanonicalFontFamilyReference.cs
- CountAggregationOperator.cs
- StrokeNodeData.cs
- InteropTrackingRecord.cs
- DataGridViewRowEventArgs.cs
- Vector3DIndependentAnimationStorage.cs
- RIPEMD160.cs
- GestureRecognizer.cs
- ClientProxyGenerator.cs
- HttpCachePolicyWrapper.cs