Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- SchemaExporter.cs
- CombinedGeometry.cs
- ChannelManagerBase.cs
- File.cs
- MSG.cs
- ManipulationDeltaEventArgs.cs
- TextCompositionEventArgs.cs
- DefaultAuthorizationContext.cs
- ResourceReferenceExpression.cs
- AttributeProviderAttribute.cs
- UnmanagedHandle.cs
- WebPartVerb.cs
- XPathExpr.cs
- GlobalizationAssembly.cs
- GeneralTransform3DGroup.cs
- arc.cs
- CodeBinaryOperatorExpression.cs
- SecurityKeyIdentifier.cs
- BrowserCapabilitiesFactory.cs
- FormClosingEvent.cs
- ToolStripSeparatorRenderEventArgs.cs
- ImplicitInputBrush.cs
- ImageField.cs
- CompareInfo.cs
- ObjectConverter.cs
- XmlAutoDetectWriter.cs
- XmlHelper.cs
- MobileTextWriter.cs
- ProcessModelInfo.cs
- ErrorProvider.cs
- CategoryAttribute.cs
- HandoffBehavior.cs
- ObjectDataSourceMethodEventArgs.cs
- SqlConnectionManager.cs
- NamedPermissionSet.cs
- KeyValuePair.cs
- Vars.cs
- ProcessHostConfigUtils.cs
- DrawTreeNodeEventArgs.cs
- ListBoxItemWrapperAutomationPeer.cs
- NodeInfo.cs
- DbRetry.cs
- Int32Rect.cs
- GraphicsPathIterator.cs
- SqlXmlStorage.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- CodeMemberEvent.cs
- ConstraintConverter.cs
- SecurityTokenValidationException.cs
- UnhandledExceptionEventArgs.cs
- PerspectiveCamera.cs
- DropSource.cs
- XamlWrappingReader.cs
- GridViewRowEventArgs.cs
- TransformConverter.cs
- UITypeEditors.cs
- ServiceElementCollection.cs
- UIElement.cs
- SurrogateEncoder.cs
- JavaScriptString.cs
- CachedTypeface.cs
- DocumentGridContextMenu.cs
- PolyLineSegmentFigureLogic.cs
- DeobfuscatingStream.cs
- BamlResourceSerializer.cs
- CodeVariableDeclarationStatement.cs
- BitArray.cs
- Crypto.cs
- OpenTypeLayout.cs
- TCPListener.cs
- SecurityTokenResolver.cs
- MembershipPasswordException.cs
- SizeConverter.cs
- ConfigurationLocation.cs
- SqlInternalConnection.cs
- ADMembershipUser.cs
- ContentFileHelper.cs
- OdbcReferenceCollection.cs
- SqlTypeSystemProvider.cs
- WsdlBuildProvider.cs
- MessageSmuggler.cs
- ItemsPresenter.cs
- TypedReference.cs
- ProjectionPruner.cs
- DateTimeConstantAttribute.cs
- unitconverter.cs
- TableLayoutRowStyleCollection.cs
- ScalarConstant.cs
- BuildDependencySet.cs
- EffectiveValueEntry.cs
- ServiceManager.cs
- HttpListenerRequest.cs
- CellTreeNodeVisitors.cs
- LabelLiteral.cs
- WebHttpBehavior.cs
- HierarchicalDataBoundControl.cs
- Memoizer.cs
- WebPartUserCapability.cs
- XPathNodePointer.cs
- ExpressionNormalizer.cs