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
- EventsTab.cs
- EventLevel.cs
- LifetimeServices.cs
- ScriptHandlerFactory.cs
- DbConnectionHelper.cs
- HttpProtocolImporter.cs
- KerberosTokenFactoryCredential.cs
- ColumnHeaderConverter.cs
- XmlAttributeAttribute.cs
- PageHandlerFactory.cs
- COM2AboutBoxPropertyDescriptor.cs
- ListBoxItemAutomationPeer.cs
- WindowsTab.cs
- ZoomPercentageConverter.cs
- LeafCellTreeNode.cs
- CodeEventReferenceExpression.cs
- HttpServerProtocol.cs
- Lease.cs
- FullTextBreakpoint.cs
- XmlStringTable.cs
- RegexRunner.cs
- ViewStateModeByIdAttribute.cs
- DefaultBindingPropertyAttribute.cs
- ISessionStateStore.cs
- SizeConverter.cs
- AssemblySettingAttributes.cs
- AnonymousIdentificationModule.cs
- AlphaSortedEnumConverter.cs
- ErrorWrapper.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- DetailsViewUpdateEventArgs.cs
- WindowsGrip.cs
- SimpleTypeResolver.cs
- FirstMatchCodeGroup.cs
- Span.cs
- Misc.cs
- SortQuery.cs
- MessageQueueTransaction.cs
- TabItemWrapperAutomationPeer.cs
- RegisteredScript.cs
- JavaScriptSerializer.cs
- PlatformCulture.cs
- WbmpConverter.cs
- FormsAuthenticationConfiguration.cs
- HttpListenerContext.cs
- StoreContentChangedEventArgs.cs
- DataGridViewHitTestInfo.cs
- ByteStreamMessageEncoderFactory.cs
- BitmapEffectGroup.cs
- QilExpression.cs
- MsmqProcessProtocolHandler.cs
- DesignerLoader.cs
- SignedXml.cs
- CollectionDataContractAttribute.cs
- EncoderFallback.cs
- ToolTipAutomationPeer.cs
- Base64Decoder.cs
- NullableConverter.cs
- infer.cs
- sitestring.cs
- SettingsPropertyValueCollection.cs
- TypeDescriptionProviderAttribute.cs
- SiteIdentityPermission.cs
- RemoteWebConfigurationHostStream.cs
- ColorAnimationUsingKeyFrames.cs
- SqlInternalConnectionTds.cs
- SafeLocalAllocation.cs
- CompleteWizardStep.cs
- InfoCardHelper.cs
- RequestCacheValidator.cs
- Process.cs
- ElementsClipboardData.cs
- COM2ExtendedUITypeEditor.cs
- CodeGen.cs
- WindowsMenu.cs
- FlowDocumentView.cs
- DynamicRenderer.cs
- DecimalFormatter.cs
- XPathAncestorIterator.cs
- WebPartDisplayModeCollection.cs
- OleDbReferenceCollection.cs
- GcSettings.cs
- CustomErrorsSectionWrapper.cs
- RtfToXamlReader.cs
- PassportAuthenticationEventArgs.cs
- documentation.cs
- RootProfilePropertySettingsCollection.cs
- SchemaNamespaceManager.cs
- SafeUserTokenHandle.cs
- InstanceOwnerException.cs
- ChannelSettingsElement.cs
- LineSegment.cs
- Event.cs
- IncrementalReadDecoders.cs
- BezierSegment.cs
- XmlSubtreeReader.cs
- XPathBuilder.cs
- DownloadProgressEventArgs.cs
- EntityPropertyMappingAttribute.cs
- MessageEncoderFactory.cs