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
- ManipulationDeltaEventArgs.cs
- StdValidatorsAndConverters.cs
- DriveInfo.cs
- BuildProvidersCompiler.cs
- KeyValueSerializer.cs
- String.cs
- XPathDescendantIterator.cs
- SmiXetterAccessMap.cs
- CompilerResults.cs
- x509store.cs
- Translator.cs
- FlatButtonAppearance.cs
- __Filters.cs
- FontFamilyValueSerializer.cs
- BindableAttribute.cs
- RelativeSource.cs
- RegexCompiler.cs
- DataBoundLiteralControl.cs
- AnnotationMap.cs
- ElementAtQueryOperator.cs
- StringCollection.cs
- ProgressBarBrushConverter.cs
- ImageDrawing.cs
- WorkflowRuntimeServiceElementCollection.cs
- HtmlFormParameterReader.cs
- ClusterSafeNativeMethods.cs
- PropertyGroupDescription.cs
- GroupLabel.cs
- TextSelectionHelper.cs
- SemaphoreFullException.cs
- MediaElementAutomationPeer.cs
- FileCodeGroup.cs
- HostVisual.cs
- categoryentry.cs
- DelayDesigner.cs
- UidManager.cs
- RegexBoyerMoore.cs
- QueryResults.cs
- EventLogPermissionEntry.cs
- Simplifier.cs
- DataFieldConverter.cs
- ReferenceConverter.cs
- designeractionlistschangedeventargs.cs
- UrlParameterWriter.cs
- AliasGenerator.cs
- KeyedHashAlgorithm.cs
- ImageAnimator.cs
- XmlSchemaExporter.cs
- NavigationCommands.cs
- X509Utils.cs
- UserControlCodeDomTreeGenerator.cs
- XmlLanguage.cs
- DataGridViewTopRowAccessibleObject.cs
- StringResourceManager.cs
- RangeValidator.cs
- BooleanToVisibilityConverter.cs
- SchemaType.cs
- CapabilitiesAssignment.cs
- ApplicationException.cs
- PageContentAsyncResult.cs
- PathFigure.cs
- Part.cs
- TextServicesDisplayAttributePropertyRanges.cs
- CategoryGridEntry.cs
- NavigationService.cs
- CodeRegionDirective.cs
- UidPropertyAttribute.cs
- PolyBezierSegment.cs
- ProtocolsSection.cs
- KeyManager.cs
- UTF8Encoding.cs
- ErrorWebPart.cs
- BevelBitmapEffect.cs
- DbConnectionInternal.cs
- XmlNodeChangedEventManager.cs
- ProxyWebPartConnectionCollection.cs
- compensatingcollection.cs
- Path.cs
- XmlRawWriter.cs
- DirectoryInfo.cs
- Validator.cs
- Thickness.cs
- EventDescriptor.cs
- PeerPresenceInfo.cs
- RoleGroupCollection.cs
- SupportedAddressingMode.cs
- XsltFunctions.cs
- precedingquery.cs
- SqlResolver.cs
- PropertyMappingExceptionEventArgs.cs
- ManifestResourceInfo.cs
- EnumerableCollectionView.cs
- ExtenderProvidedPropertyAttribute.cs
- OperatingSystem.cs
- GridItemCollection.cs
- SystemTcpStatistics.cs
- FreezableCollection.cs
- Focus.cs
- Bold.cs
- ProgressBarBrushConverter.cs