Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- MetaDataInfo.cs
- HelpInfo.cs
- MinMaxParagraphWidth.cs
- FixedSOMPageElement.cs
- Query.cs
- ScriptResourceInfo.cs
- Double.cs
- ControlBuilderAttribute.cs
- Regex.cs
- XPathNodeList.cs
- ValueUtilsSmi.cs
- GlyphElement.cs
- AuthorizationRule.cs
- FederatedMessageSecurityOverHttpElement.cs
- FormViewCommandEventArgs.cs
- XmlElementAttribute.cs
- SHA1CryptoServiceProvider.cs
- HyperLinkColumn.cs
- StringValueConverter.cs
- DefaultAsyncDataDispatcher.cs
- KernelTypeValidation.cs
- HGlobalSafeHandle.cs
- StyleXamlTreeBuilder.cs
- RuntimeConfigLKG.cs
- SqlException.cs
- XmlTextReaderImplHelpers.cs
- EntryPointNotFoundException.cs
- HtmlAnchor.cs
- PointValueSerializer.cs
- AssertUtility.cs
- WpfPayload.cs
- StyleCollection.cs
- DBSchemaTable.cs
- RadioButtonAutomationPeer.cs
- GPPOINTF.cs
- SendingRequestEventArgs.cs
- DefaultPropertiesToSend.cs
- XsdDuration.cs
- ConstrainedGroup.cs
- RegexGroupCollection.cs
- ForEachAction.cs
- _IPv6Address.cs
- CodeCommentStatementCollection.cs
- Renderer.cs
- WindowsFormsHostPropertyMap.cs
- MailAddressCollection.cs
- NameTable.cs
- DPAPIProtectedConfigurationProvider.cs
- Sql8ExpressionRewriter.cs
- ServiceReference.cs
- SelectQueryOperator.cs
- StatusBarAutomationPeer.cs
- SizeConverter.cs
- SerializationFieldInfo.cs
- HiddenField.cs
- SQLDateTime.cs
- ButtonFlatAdapter.cs
- RubberbandSelector.cs
- CombinedGeometry.cs
- InfoCardRSACryptoProvider.cs
- dsa.cs
- BulletDecorator.cs
- Int32.cs
- WindowInteractionStateTracker.cs
- HybridCollection.cs
- CollectionBuilder.cs
- Mutex.cs
- SchemaMerger.cs
- CodeCatchClause.cs
- PeerName.cs
- MtomMessageEncodingElement.cs
- StackOverflowException.cs
- DataRowView.cs
- OneOfTypeConst.cs
- SrgsToken.cs
- ObjectDataSource.cs
- SqlDataSourceFilteringEventArgs.cs
- AnnouncementEndpoint.cs
- SHA512.cs
- embossbitmapeffect.cs
- ConnectionStringSettingsCollection.cs
- StyleTypedPropertyAttribute.cs
- XPathQilFactory.cs
- DynamicMetaObject.cs
- QueryHandler.cs
- ReadOnlyObservableCollection.cs
- IntersectQueryOperator.cs
- followingsibling.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- BamlBinaryWriter.cs
- AuthenticationService.cs
- FixedSOMContainer.cs
- CodeAttributeArgument.cs
- LogFlushAsyncResult.cs
- BuildProviderInstallComponent.cs
- initElementDictionary.cs
- TimeSpanHelper.cs
- MsmqElementBase.cs
- ExpandoClass.cs
- AspProxy.cs