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
- SafeBitVector32.cs
- TextTreeInsertElementUndoUnit.cs
- ComponentEditorPage.cs
- UnhandledExceptionEventArgs.cs
- DependencyPropertyConverter.cs
- LicenseContext.cs
- XappLauncher.cs
- RemoteHelper.cs
- LogicalExpr.cs
- GlyphingCache.cs
- LinkConverter.cs
- SQLConvert.cs
- GACIdentityPermission.cs
- Propagator.cs
- CellTreeNodeVisitors.cs
- X509ImageLogo.cs
- ReadOnlyObservableCollection.cs
- Type.cs
- ObjectDataSource.cs
- SimpleBitVector32.cs
- Visual3DCollection.cs
- OdbcErrorCollection.cs
- ListParagraph.cs
- ViewCellRelation.cs
- TargetPerspective.cs
- HwndKeyboardInputProvider.cs
- XmlObjectSerializerWriteContext.cs
- DataColumnMapping.cs
- WinFormsSecurity.cs
- TransformerInfoCollection.cs
- BuildDependencySet.cs
- WsiProfilesElement.cs
- NewArrayExpression.cs
- ObjectResult.cs
- MenuItemBindingCollection.cs
- MimeMapping.cs
- SystemInfo.cs
- DecoderFallbackWithFailureFlag.cs
- ColorConvertedBitmap.cs
- LinqDataSourceSelectEventArgs.cs
- __Filters.cs
- Win32Exception.cs
- MatchingStyle.cs
- OutputCacheProfileCollection.cs
- ApplicationSettingsBase.cs
- MonthCalendarDesigner.cs
- DataGridViewCellValidatingEventArgs.cs
- WCFModelStrings.Designer.cs
- Button.cs
- SRef.cs
- HyperlinkAutomationPeer.cs
- MasterPageBuildProvider.cs
- WindowAutomationPeer.cs
- QueryParameter.cs
- LineBreakRecord.cs
- WindowsRichEditRange.cs
- ListViewItem.cs
- DecoderReplacementFallback.cs
- CustomTypeDescriptor.cs
- SpeechSynthesizer.cs
- TextEmbeddedObject.cs
- XmlDataImplementation.cs
- TabletDeviceInfo.cs
- TagMapInfo.cs
- DefaultValueConverter.cs
- XmlAtomicValue.cs
- WebPartConnectionsCloseVerb.cs
- CaseKeyBox.ViewModel.cs
- KeyBinding.cs
- SetIterators.cs
- LogExtent.cs
- NavigatorInvalidBodyAccessException.cs
- HtmlProps.cs
- XamlPathDataSerializer.cs
- UInt16.cs
- SortQuery.cs
- ScrollContentPresenter.cs
- TemplatePartAttribute.cs
- CommandField.cs
- SelectionChangedEventArgs.cs
- tooltip.cs
- CircleHotSpot.cs
- PropertyEmitterBase.cs
- CapabilitiesSection.cs
- CSharpCodeProvider.cs
- FixedTextContainer.cs
- ProgressBarBrushConverter.cs
- RedistVersionInfo.cs
- CssTextWriter.cs
- EnumValAlphaComparer.cs
- PropertyValueChangedEvent.cs
- SrgsItemList.cs
- FixedSOMContainer.cs
- LinearGradientBrush.cs
- HitTestParameters3D.cs
- PageThemeBuildProvider.cs
- RestrictedTransactionalPackage.cs
- ItemMap.cs
- RecordBuilder.cs
- SystemColorTracker.cs