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
- RangeBase.cs
- ObjectDataSourceDisposingEventArgs.cs
- InheritanceContextHelper.cs
- ToolStripDropDownClosingEventArgs.cs
- SrgsSemanticInterpretationTag.cs
- EncoderReplacementFallback.cs
- Renderer.cs
- DbParameterCollectionHelper.cs
- GeometryValueSerializer.cs
- ManipulationInertiaStartingEventArgs.cs
- FormViewPageEventArgs.cs
- TextEndOfLine.cs
- TTSVoice.cs
- FileDataSourceCache.cs
- MgmtConfigurationRecord.cs
- BooleanSwitch.cs
- QuaternionConverter.cs
- SqlDataSourceSelectingEventArgs.cs
- HtmlTextArea.cs
- StyleCollection.cs
- IntPtr.cs
- CodeTypeReference.cs
- PointLight.cs
- TextWriterTraceListener.cs
- NetMsmqSecurityMode.cs
- OracleInternalConnection.cs
- PenThreadWorker.cs
- FloaterBaseParagraph.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- JavaScriptObjectDeserializer.cs
- TransformerConfigurationWizardBase.cs
- PixelFormat.cs
- RoleManagerModule.cs
- TrayIconDesigner.cs
- DependencySource.cs
- _IPv4Address.cs
- OperationPerformanceCounters.cs
- SQLInt16Storage.cs
- GridSplitter.cs
- SecureStringHasher.cs
- GenerateScriptTypeAttribute.cs
- CompiledELinqQueryState.cs
- FrugalMap.cs
- X509CertificateChain.cs
- XmlDeclaration.cs
- DataBinding.cs
- CellCreator.cs
- SortDescription.cs
- SymmetricSecurityProtocolFactory.cs
- SocketException.cs
- PointCollection.cs
- SmtpLoginAuthenticationModule.cs
- CodeThrowExceptionStatement.cs
- Avt.cs
- typedescriptorpermissionattribute.cs
- HandlerFactoryCache.cs
- EdmComplexTypeAttribute.cs
- OleDbConnectionInternal.cs
- UpdateTracker.cs
- _TLSstream.cs
- FragmentNavigationEventArgs.cs
- Enum.cs
- CacheMemory.cs
- ToolStripDesignerUtils.cs
- ControlDesigner.cs
- NameTable.cs
- DocumentPageView.cs
- SqlClientWrapperSmiStreamChars.cs
- IndependentAnimationStorage.cs
- _SSPIWrapper.cs
- NotCondition.cs
- RelationshipEnd.cs
- MailBnfHelper.cs
- RequestBringIntoViewEventArgs.cs
- DataGridViewColumnHeaderCell.cs
- CodeAccessSecurityEngine.cs
- Math.cs
- BitmapSource.cs
- PreProcessor.cs
- CompensationToken.cs
- Button.cs
- MaskedTextBox.cs
- InheritanceRules.cs
- FaultContext.cs
- MethodResolver.cs
- Misc.cs
- SmtpReplyReaderFactory.cs
- messageonlyhwndwrapper.cs
- BamlRecordHelper.cs
- XsltSettings.cs
- OledbConnectionStringbuilder.cs
- CustomAttributeFormatException.cs
- StreamInfo.cs
- AsyncSerializedWorker.cs
- ScriptBehaviorDescriptor.cs
- OdbcRowUpdatingEvent.cs
- DynamicValueConverter.cs
- PointF.cs
- OleDbPermission.cs
- ProviderUtil.cs