Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / DefaultSection.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebZoneDesigner.cs
- ObjectViewListener.cs
- FixedNode.cs
- LoadRetryConstantStrategy.cs
- BehaviorDragDropEventArgs.cs
- RC2CryptoServiceProvider.cs
- Span.cs
- UpdatePanel.cs
- XmlEventCache.cs
- DataSourceNameHandler.cs
- SmiEventSink.cs
- SoapWriter.cs
- XPathSingletonIterator.cs
- ParserOptions.cs
- CompensationDesigner.cs
- Utils.cs
- SqlAggregateChecker.cs
- WasEndpointConfigContainer.cs
- OutputCacheProfile.cs
- OleDbRowUpdatedEvent.cs
- AnnouncementEndpointElement.cs
- Invariant.cs
- HttpPostedFileWrapper.cs
- Solver.cs
- ReliableMessagingVersionConverter.cs
- TypeReference.cs
- dataprotectionpermission.cs
- GroupByExpressionRewriter.cs
- NGCSerializationManager.cs
- RectangleF.cs
- DataSourceHelper.cs
- XmlDataDocument.cs
- PropertyIDSet.cs
- WebPartChrome.cs
- ButtonBaseAutomationPeer.cs
- TableLayoutStyleCollection.cs
- TextRunTypographyProperties.cs
- CurrentChangingEventArgs.cs
- Nullable.cs
- ByteKeyFrameCollection.cs
- CapiNative.cs
- CommandBinding.cs
- ConvertEvent.cs
- Win32KeyboardDevice.cs
- XmlCollation.cs
- BrowserCapabilitiesFactory.cs
- WebExceptionStatus.cs
- ReaderContextStackData.cs
- ManifestResourceInfo.cs
- BaseTemplateBuildProvider.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- DocumentViewerBase.cs
- LOSFormatter.cs
- StrokeRenderer.cs
- StructuredType.cs
- XamlStackWriter.cs
- TextParaLineResult.cs
- RegionInfo.cs
- ListCollectionView.cs
- CombinedGeometry.cs
- PagesSection.cs
- StringOutput.cs
- Win32.cs
- ChtmlTextWriter.cs
- ItemsChangedEventArgs.cs
- ControlEvent.cs
- User.cs
- HttpCachePolicyWrapper.cs
- ListBoxItemWrapperAutomationPeer.cs
- Error.cs
- BaseAppDomainProtocolHandler.cs
- DataGrid.cs
- CacheHelper.cs
- MergeFilterQuery.cs
- ApplicationDirectoryMembershipCondition.cs
- HtmlInputControl.cs
- IgnoreSection.cs
- ButtonBase.cs
- DataGridRowHeaderAutomationPeer.cs
- OdbcInfoMessageEvent.cs
- SQLInt64.cs
- HtmlFormWrapper.cs
- PeerContact.cs
- MatrixKeyFrameCollection.cs
- Parallel.cs
- GraphicsContext.cs
- ADConnectionHelper.cs
- SecurityContext.cs
- ZoneLinkButton.cs
- CellRelation.cs
- ObjectCloneHelper.cs
- HashCryptoHandle.cs
- MailWebEventProvider.cs
- MD5.cs
- TableLayoutColumnStyleCollection.cs
- SingleAnimationBase.cs
- TraceSource.cs
- XmlSchemaCompilationSettings.cs
- DesignerUtility.cs
- DesignTimeTemplateParser.cs