Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- DNS.cs
- Stopwatch.cs
- PrePrepareMethodAttribute.cs
- ContextStack.cs
- EditCommandColumn.cs
- TextEditorTables.cs
- MethodToken.cs
- WindowsListViewItem.cs
- WebReferenceOptions.cs
- XmlDataSourceView.cs
- FileLogRecord.cs
- EntityDataSourceColumn.cs
- WebPartsPersonalizationAuthorization.cs
- HtmlWindowCollection.cs
- ResXBuildProvider.cs
- SemaphoreSecurity.cs
- FormsAuthenticationUser.cs
- FlowPosition.cs
- ImageKeyConverter.cs
- ScriptModule.cs
- CompleteWizardStep.cs
- Vector3D.cs
- HtmlTextViewAdapter.cs
- CleanUpVirtualizedItemEventArgs.cs
- SoapHttpTransportImporter.cs
- Visual3D.cs
- NonParentingControl.cs
- X509Certificate2Collection.cs
- SQLChars.cs
- FontStretchConverter.cs
- SourceItem.cs
- Knowncolors.cs
- ShadowGlyph.cs
- StringConverter.cs
- TypedReference.cs
- UserMapPath.cs
- FragmentQuery.cs
- FileDataSourceCache.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- ValueTypeFixupInfo.cs
- PageAsyncTaskManager.cs
- __FastResourceComparer.cs
- ParseNumbers.cs
- SQLBytes.cs
- FunctionCommandText.cs
- QueryOperator.cs
- LassoSelectionBehavior.cs
- ServiceErrorHandler.cs
- TreeView.cs
- GenericEnumConverter.cs
- CharacterBuffer.cs
- objectquery_tresulttype.cs
- EndEvent.cs
- ConfigurationManagerInternal.cs
- MailWriter.cs
- PropertyGridView.cs
- ProfileService.cs
- ErrorWebPart.cs
- PropertyChangedEventArgs.cs
- NonParentingControl.cs
- PageTheme.cs
- Graph.cs
- AccessedThroughPropertyAttribute.cs
- XmlParserContext.cs
- XslCompiledTransform.cs
- MergeLocalizationDirectives.cs
- Vector.cs
- TextViewSelectionProcessor.cs
- CodeTypeDelegate.cs
- StyleCollection.cs
- WithParamAction.cs
- TextEmbeddedObject.cs
- SeparatorAutomationPeer.cs
- WindowsSpinner.cs
- ShapeTypeface.cs
- KnownBoxes.cs
- LogLogRecord.cs
- ContainerUtilities.cs
- Funcletizer.cs
- ToolCreatedEventArgs.cs
- CultureSpecificStringDictionary.cs
- sqlcontext.cs
- PaintEvent.cs
- PinProtectionHelper.cs
- LinkedDataMemberFieldEditor.cs
- ObjectStorage.cs
- TextEditorTables.cs
- ObjectViewQueryResultData.cs
- AlgoModule.cs
- SafeProcessHandle.cs
- EnumUnknown.cs
- ComplexBindingPropertiesAttribute.cs
- WasEndpointConfigContainer.cs
- StickyNoteContentControl.cs
- CompilerHelpers.cs
- LexicalChunk.cs
- Simplifier.cs
- WindowPatternIdentifiers.cs
- HeaderElement.cs
- XPathDescendantIterator.cs