Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / ConfigurationSection.cs / 1 / ConfigurationSection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System; using System.Collections.Specialized; using System.Configuration.Internal; using System.IO; using System.Reflection; using System.Security; using System.Text; using System.Xml; using System.Globalization; public abstract class ConfigurationSection : ConfigurationElement { private SectionInformation _section; // Constructor // protected ConfigurationSection() { _section = new SectionInformation( this ); } // SectionInformation property // // Retrieve the class associated with the Section information // public SectionInformation SectionInformation { get { return _section; } } // GetRuntimeObject // // Return the Runtime Object for this Section // protected internal virtual object GetRuntimeObject() { return this; } protected internal override bool IsModified() { return ( SectionInformation.IsModifiedFlags() || base.IsModified() ); } protected internal override void ResetModified() { SectionInformation.ResetModifiedFlags(); base.ResetModified(); } protected internal virtual void DeserializeSection(XmlReader reader) { if (!reader.Read() || reader.NodeType != XmlNodeType.Element) { throw new ConfigurationErrorsException(SR.GetString(SR.Config_base_expected_to_find_element), reader); } DeserializeElement(reader, false); } protected internal virtual string SerializeSection(ConfigurationElement parentElement, string name, ConfigurationSaveMode saveMode) { ValidateElement(this, null, true); ConfigurationElement TempElement = CreateElement(this.GetType()); TempElement.Unmerge(this, parentElement, saveMode); StringWriter strWriter = new StringWriter(CultureInfo.InvariantCulture); XmlTextWriter writer = new XmlTextWriter(strWriter); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; TempElement.DataToWriteInternal = (saveMode != ConfigurationSaveMode.Minimal); TempElement.SerializeToXmlElement(writer, name); writer.Flush(); return strWriter.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System; using System.Collections.Specialized; using System.Configuration.Internal; using System.IO; using System.Reflection; using System.Security; using System.Text; using System.Xml; using System.Globalization; public abstract class ConfigurationSection : ConfigurationElement { private SectionInformation _section; // Constructor // protected ConfigurationSection() { _section = new SectionInformation( this ); } // SectionInformation property // // Retrieve the class associated with the Section information // public SectionInformation SectionInformation { get { return _section; } } // GetRuntimeObject // // Return the Runtime Object for this Section // protected internal virtual object GetRuntimeObject() { return this; } protected internal override bool IsModified() { return ( SectionInformation.IsModifiedFlags() || base.IsModified() ); } protected internal override void ResetModified() { SectionInformation.ResetModifiedFlags(); base.ResetModified(); } protected internal virtual void DeserializeSection(XmlReader reader) { if (!reader.Read() || reader.NodeType != XmlNodeType.Element) { throw new ConfigurationErrorsException(SR.GetString(SR.Config_base_expected_to_find_element), reader); } DeserializeElement(reader, false); } protected internal virtual string SerializeSection(ConfigurationElement parentElement, string name, ConfigurationSaveMode saveMode) { ValidateElement(this, null, true); ConfigurationElement TempElement = CreateElement(this.GetType()); TempElement.Unmerge(this, parentElement, saveMode); StringWriter strWriter = new StringWriter(CultureInfo.InvariantCulture); XmlTextWriter writer = new XmlTextWriter(strWriter); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; TempElement.DataToWriteInternal = (saveMode != ConfigurationSaveMode.Minimal); TempElement.SerializeToXmlElement(writer, name); writer.Flush(); return strWriter.ToString(); } } } // 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
- SecurityManager.cs
- TextInfo.cs
- QilStrConcat.cs
- unsafeIndexingFilterStream.cs
- SoapCodeExporter.cs
- LayoutTable.cs
- PropertyTabAttribute.cs
- FamilyMap.cs
- RelatedEnd.cs
- filewebrequest.cs
- HeaderFilter.cs
- ExtensionQuery.cs
- StylusPointPropertyUnit.cs
- HitTestWithPointDrawingContextWalker.cs
- ExpressionBuilderContext.cs
- XmlAutoDetectWriter.cs
- CompileLiteralTextParser.cs
- DataError.cs
- Qualifier.cs
- SystemIPv4InterfaceProperties.cs
- ClipboardProcessor.cs
- ImportCatalogPart.cs
- HitTestResult.cs
- ConnectionStringSettingsCollection.cs
- TransformerConfigurationWizardBase.cs
- UnicodeEncoding.cs
- ProvidersHelper.cs
- WSFederationHttpBindingCollectionElement.cs
- DateTimeOffsetStorage.cs
- ItemList.cs
- ComponentDispatcher.cs
- UnsafePeerToPeerMethods.cs
- X509Certificate.cs
- PropertyBuilder.cs
- _LazyAsyncResult.cs
- COAUTHIDENTITY.cs
- OuterGlowBitmapEffect.cs
- DatagridviewDisplayedBandsData.cs
- SQLBinary.cs
- StructuralType.cs
- PersonalizationStateInfo.cs
- XmlDataSource.cs
- CancelAsyncOperationRequest.cs
- RelationshipEntry.cs
- FieldMetadata.cs
- BaseTemplateParser.cs
- StandardToolWindows.cs
- RectIndependentAnimationStorage.cs
- ServiceOperationDetailViewControl.cs
- XPathSingletonIterator.cs
- TypedTableBaseExtensions.cs
- SchemaAttDef.cs
- TypeBinaryExpression.cs
- ChildDocumentBlock.cs
- WorkflowTerminatedException.cs
- TreeIterators.cs
- CacheForPrimitiveTypes.cs
- FileDetails.cs
- SafeThemeHandle.cs
- ProcessModule.cs
- Pen.cs
- WebPartConnectionsCloseVerb.cs
- SynchronizingStream.cs
- EntityObject.cs
- SystemFonts.cs
- XmlReflectionMember.cs
- SqlDataSourceStatusEventArgs.cs
- SystemIPInterfaceProperties.cs
- SystemColors.cs
- BamlReader.cs
- UrlRoutingModule.cs
- TransformationRules.cs
- FirstMatchCodeGroup.cs
- SelectionRange.cs
- RegularExpressionValidator.cs
- DependencyPropertyConverter.cs
- TemplateControlParser.cs
- MetricEntry.cs
- NumericUpDown.cs
- _ContextAwareResult.cs
- KeyPullup.cs
- DynamicMethod.cs
- ProcessInfo.cs
- RTLAwareMessageBox.cs
- xdrvalidator.cs
- Membership.cs
- WebAdminConfigurationHelper.cs
- ProgressChangedEventArgs.cs
- WhereaboutsReader.cs
- CompilerScopeManager.cs
- Registry.cs
- AvtEvent.cs
- QilXmlWriter.cs
- BoundColumn.cs
- ReferenceCountedObject.cs
- DbModificationClause.cs
- ListViewItem.cs
- ToolStripSettings.cs
- SecurityContextTokenCache.cs
- SourceLineInfo.cs