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
- EventLog.cs
- PersistChildrenAttribute.cs
- ZoneLinkButton.cs
- _BasicClient.cs
- TabControlEvent.cs
- EncryptedData.cs
- CachedTypeface.cs
- HwndSourceParameters.cs
- InvokeGenerator.cs
- IndexerNameAttribute.cs
- Activator.cs
- Canvas.cs
- GroupBox.cs
- MetadataItemEmitter.cs
- ElementNotEnabledException.cs
- RangeEnumerable.cs
- Brush.cs
- PrintController.cs
- ReaderWriterLockWrapper.cs
- ExpressionEditorSheet.cs
- Compiler.cs
- PersonalizationStateQuery.cs
- UrlParameterWriter.cs
- Mappings.cs
- EUCJPEncoding.cs
- SendSecurityHeaderElementContainer.cs
- DataSourceView.cs
- FixedSOMTableRow.cs
- DynamicHyperLink.cs
- AsmxEndpointPickerExtension.cs
- DeviceFilterDictionary.cs
- WebBrowserProgressChangedEventHandler.cs
- MimeReturn.cs
- _RequestCacheProtocol.cs
- ValidatorCompatibilityHelper.cs
- Compilation.cs
- XmlWellformedWriter.cs
- BinaryFormatterWriter.cs
- AttributeXamlType.cs
- MeshGeometry3D.cs
- UIntPtr.cs
- ColumnHeaderConverter.cs
- CodeGroup.cs
- SqlUtils.cs
- CultureInfoConverter.cs
- ActivatableWorkflowsQueryResult.cs
- CategoriesDocumentFormatter.cs
- ApplicationProxyInternal.cs
- XamlRtfConverter.cs
- ViewService.cs
- EventSourceCreationData.cs
- TrustSection.cs
- Literal.cs
- PeerNameRecordCollection.cs
- Directory.cs
- XmlNavigatorStack.cs
- GradientStopCollection.cs
- CmsInterop.cs
- PropertyInfo.cs
- Region.cs
- BrowserDefinition.cs
- PrintControllerWithStatusDialog.cs
- CertificateManager.cs
- SpeakInfo.cs
- XmlTypeMapping.cs
- TableRowGroup.cs
- CodeDirectionExpression.cs
- RoutedEventArgs.cs
- ObfuscateAssemblyAttribute.cs
- XmlDocument.cs
- OdbcDataReader.cs
- TimeStampChecker.cs
- ToolStripPanelRenderEventArgs.cs
- RangeValidator.cs
- KeyValueSerializer.cs
- SQLBytesStorage.cs
- BinaryCommonClasses.cs
- ISAPIApplicationHost.cs
- ClockGroup.cs
- VariableQuery.cs
- ExpiredSecurityTokenException.cs
- Control.cs
- IdentityManager.cs
- ChangeTracker.cs
- TimeoutValidationAttribute.cs
- SqlProcedureAttribute.cs
- Asn1IntegerConverter.cs
- LogicalCallContext.cs
- CodeTypeReferenceCollection.cs
- Dictionary.cs
- SystemWebExtensionsSectionGroup.cs
- ObjectTag.cs
- DataPointer.cs
- EntityCommandExecutionException.cs
- Publisher.cs
- NetworkStream.cs
- AmbiguousMatchException.cs
- SignatureDescription.cs
- LinearGradientBrush.cs
- CodeIterationStatement.cs