Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Configuration / System / Configuration / DefaultSection.cs / 1 / DefaultSection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Xml; public sealed class DefaultSection : ConfigurationSection { private static ConfigurationPropertyCollection s_properties; string _rawXml = string.Empty; bool _isModified; private static ConfigurationPropertyCollection EnsureStaticPropertyBag() { if (s_properties == null) { ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); s_properties = properties; } return s_properties; } public DefaultSection() { EnsureStaticPropertyBag(); } protected internal override ConfigurationPropertyCollection Properties { get { return EnsureStaticPropertyBag(); } } protected internal override bool IsModified() { return _isModified; } protected internal override void ResetModified() { _isModified = false; } protected internal override void Reset(ConfigurationElement parentSection) { _rawXml = string.Empty; _isModified = false; } protected internal override void DeserializeSection(XmlReader xmlReader) { if (!xmlReader.Read() || xmlReader.NodeType != XmlNodeType.Element) { throw new ConfigurationErrorsException(SR.GetString(SR.Config_base_expected_to_find_element), xmlReader); } _rawXml = xmlReader.ReadOuterXml(); _isModified = true; } protected internal override string SerializeSection(ConfigurationElement parentSection, string name, ConfigurationSaveMode saveMode) { return _rawXml; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Xml; public sealed class DefaultSection : ConfigurationSection { private static ConfigurationPropertyCollection s_properties; string _rawXml = string.Empty; bool _isModified; private static ConfigurationPropertyCollection EnsureStaticPropertyBag() { if (s_properties == null) { ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); s_properties = properties; } return s_properties; } public DefaultSection() { EnsureStaticPropertyBag(); } protected internal override ConfigurationPropertyCollection Properties { get { return EnsureStaticPropertyBag(); } } protected internal override bool IsModified() { return _isModified; } protected internal override void ResetModified() { _isModified = false; } protected internal override void Reset(ConfigurationElement parentSection) { _rawXml = string.Empty; _isModified = false; } protected internal override void DeserializeSection(XmlReader xmlReader) { if (!xmlReader.Read() || xmlReader.NodeType != XmlNodeType.Element) { throw new ConfigurationErrorsException(SR.GetString(SR.Config_base_expected_to_find_element), xmlReader); } _rawXml = xmlReader.ReadOuterXml(); _isModified = true; } protected internal override string SerializeSection(ConfigurationElement parentSection, string name, ConfigurationSaveMode saveMode) { return _rawXml; } } } // 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
- BridgeDataRecord.cs
- IPPacketInformation.cs
- XamlFigureLengthSerializer.cs
- OleDbReferenceCollection.cs
- EventEntry.cs
- AssemblyUtil.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- AsymmetricAlgorithm.cs
- _OverlappedAsyncResult.cs
- updatecommandorderer.cs
- SystemInformation.cs
- DataControlFieldCollection.cs
- VectorAnimation.cs
- SubpageParaClient.cs
- XsltInput.cs
- WinFormsComponentEditor.cs
- NonDualMessageSecurityOverHttpElement.cs
- CodeAccessSecurityEngine.cs
- SectionUpdates.cs
- PenContext.cs
- DropShadowEffect.cs
- NativeMethods.cs
- SelectionPattern.cs
- UpdatePanel.cs
- TextTreeDeleteContentUndoUnit.cs
- SaveFileDialog.cs
- ScriptingRoleServiceSection.cs
- XmlQueryContext.cs
- MissingMethodException.cs
- MenuTracker.cs
- ErrorFormatter.cs
- GridViewCommandEventArgs.cs
- CapabilitiesState.cs
- XmlWrappingReader.cs
- ToolStripDropDownClosedEventArgs.cs
- MemberMaps.cs
- CultureInfoConverter.cs
- ToolStripItem.cs
- Serializer.cs
- BindingContext.cs
- Matrix3DConverter.cs
- assertwrapper.cs
- BitSet.cs
- AutomationProperty.cs
- CryptoApi.cs
- PauseStoryboard.cs
- FixedSOMTextRun.cs
- ActivityPropertyReference.cs
- WebCategoryAttribute.cs
- Utils.cs
- log.cs
- LinqDataSourceHelper.cs
- WSMessageEncoding.cs
- KnownTypeAttribute.cs
- UIntPtr.cs
- BaseDataBoundControlDesigner.cs
- SQLConvert.cs
- HMACSHA1.cs
- GeometryHitTestResult.cs
- ReliableDuplexSessionChannel.cs
- CanonicalFormWriter.cs
- Byte.cs
- JournalNavigationScope.cs
- ImageSourceConverter.cs
- WCFModelStrings.Designer.cs
- SoapSchemaMember.cs
- FileLogRecord.cs
- HybridDictionary.cs
- BitmapScalingModeValidation.cs
- DocumentSchemaValidator.cs
- LineInfo.cs
- OdbcException.cs
- SqlConnectionPoolProviderInfo.cs
- Errors.cs
- ProxyElement.cs
- TextComposition.cs
- EventLogPermissionHolder.cs
- SqlVersion.cs
- XamlReaderHelper.cs
- LayoutEditorPart.cs
- LinqDataView.cs
- MSAAWinEventWrap.cs
- XsltConvert.cs
- EncoderExceptionFallback.cs
- _ContextAwareResult.cs
- InputBindingCollection.cs
- _HeaderInfoTable.cs
- ObjectStateEntryDbDataRecord.cs
- SudsParser.cs
- CultureInfo.cs
- HttpRequestTraceRecord.cs
- MLangCodePageEncoding.cs
- InputGestureCollection.cs
- SQLInt16.cs
- StorageEndPropertyMapping.cs
- AppDomainEvidenceFactory.cs
- ZipPackage.cs
- DecoderFallback.cs
- HttpProfileBase.cs
- ImpersonateTokenRef.cs