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
- FlatButtonAppearance.cs
- PopupControlService.cs
- VisualStateManager.cs
- SQLGuid.cs
- RemotingSurrogateSelector.cs
- ContainerFilterService.cs
- PageClientProxyGenerator.cs
- Mutex.cs
- CacheAxisQuery.cs
- CollectionDataContractAttribute.cs
- CodeVariableDeclarationStatement.cs
- EventToken.cs
- Rule.cs
- KerberosSecurityTokenProvider.cs
- DecoratedNameAttribute.cs
- CatalogPart.cs
- SqlTriggerAttribute.cs
- IIS7UserPrincipal.cs
- IntSecurity.cs
- ResourceReferenceKeyNotFoundException.cs
- ElementAction.cs
- DropShadowEffect.cs
- EntityDesignerBuildProvider.cs
- CDSCollectionETWBCLProvider.cs
- DataGridAutoFormatDialog.cs
- MaskedTextBox.cs
- XhtmlBasicCommandAdapter.cs
- PriorityRange.cs
- Wildcard.cs
- ExecutionPropertyManager.cs
- Int64.cs
- SmtpException.cs
- SecurityHeader.cs
- LicenseContext.cs
- HealthMonitoringSection.cs
- HttpServerUtilityWrapper.cs
- XmlSchemaComplexContent.cs
- Type.cs
- ProcessModuleDesigner.cs
- TopClause.cs
- TransformerTypeCollection.cs
- util.cs
- RegionInfo.cs
- BitmapData.cs
- CLSCompliantAttribute.cs
- RsaKeyGen.cs
- _ShellExpression.cs
- HandleInitializationContext.cs
- Atom10FormatterFactory.cs
- DeploymentSectionCache.cs
- DependencySource.cs
- VerificationAttribute.cs
- datacache.cs
- CommandBinding.cs
- PassportPrincipal.cs
- BitSet.cs
- FormClosedEvent.cs
- CompilationUtil.cs
- TextViewSelectionProcessor.cs
- XmlSchemaDatatype.cs
- DataBindingCollectionConverter.cs
- PropertyManager.cs
- ServiceDescriptionReflector.cs
- UidManager.cs
- Mapping.cs
- TdsParameterSetter.cs
- AppModelKnownContentFactory.cs
- CompiledWorkflowDefinitionContext.cs
- AppDomain.cs
- SudsCommon.cs
- WebServiceEnumData.cs
- SchemaAttDef.cs
- XmlDataFileEditor.cs
- ContextMenuStripGroup.cs
- TraceProvider.cs
- ClientTargetCollection.cs
- MemberInfoSerializationHolder.cs
- MimeImporter.cs
- ReaderContextStackData.cs
- DesignerHost.cs
- TokenFactoryBase.cs
- FloatSumAggregationOperator.cs
- RelationshipType.cs
- FileSystemInfo.cs
- HostedNamedPipeTransportManager.cs
- TCEAdapterGenerator.cs
- ListViewUpdateEventArgs.cs
- FixedTextView.cs
- FormsAuthenticationEventArgs.cs
- XmlNode.cs
- MenuEventArgs.cs
- ContextBase.cs
- XmlTypeAttribute.cs
- SqlWriter.cs
- HtmlImage.cs
- EntityConnection.cs
- PlatformNotSupportedException.cs
- DbConvert.cs
- PathNode.cs
- SafeNativeMethods.cs