Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- TypeBuilderInstantiation.cs
- AnnotationHelper.cs
- TableLayoutPanelCellPosition.cs
- GlobalAllocSafeHandle.cs
- SpeechAudioFormatInfo.cs
- MissingMemberException.cs
- BufferBuilder.cs
- EditorAttribute.cs
- StrongBox.cs
- QuadraticBezierSegment.cs
- SelectionHighlightInfo.cs
- ReceiveSecurityHeader.cs
- HttpResponseHeader.cs
- RelationalExpressions.cs
- TabPage.cs
- Graphics.cs
- UIElementAutomationPeer.cs
- TransformConverter.cs
- ContainerControlDesigner.cs
- WebPartConnectionsCloseVerb.cs
- DivideByZeroException.cs
- DbSetClause.cs
- WebProxyScriptElement.cs
- ObjectViewQueryResultData.cs
- AggregateNode.cs
- Bits.cs
- EntityCommandExecutionException.cs
- Italic.cs
- ListBox.cs
- FormatConvertedBitmap.cs
- DynamicResourceExtensionConverter.cs
- PeerMessageDispatcher.cs
- TableColumnCollection.cs
- HttpCachePolicyWrapper.cs
- ObjectSet.cs
- SmtpAuthenticationManager.cs
- LinkedList.cs
- SHA256CryptoServiceProvider.cs
- WebPartDisplayModeEventArgs.cs
- ApplicationActivator.cs
- ClientSettings.cs
- EntitySetBaseCollection.cs
- FixedHyperLink.cs
- JavascriptXmlWriterWrapper.cs
- TreeViewAutomationPeer.cs
- HtmlTernaryTree.cs
- SHA512Managed.cs
- QilTernary.cs
- DefaultBinder.cs
- NameValueSectionHandler.cs
- CompositeActivityDesigner.cs
- WorkflowShape.cs
- RecipientInfo.cs
- CaseInsensitiveComparer.cs
- StringFreezingAttribute.cs
- ContainerFilterService.cs
- FontDialog.cs
- ProcessModule.cs
- DesignTimeTemplateParser.cs
- EllipticalNodeOperations.cs
- RayHitTestParameters.cs
- AnimatedTypeHelpers.cs
- Util.cs
- HwndPanningFeedback.cs
- XmlSortKeyAccumulator.cs
- AffineTransform3D.cs
- LOSFormatter.cs
- FileAccessException.cs
- InputProviderSite.cs
- TypedTableBase.cs
- DataGridViewCellLinkedList.cs
- CollectionBuilder.cs
- ListItemConverter.cs
- StatusBar.cs
- SegmentInfo.cs
- SystemResourceHost.cs
- CheckBox.cs
- ListViewTableCell.cs
- LoadRetryStrategyFactory.cs
- DescendantBaseQuery.cs
- Msec.cs
- LocalizedNameDescriptionPair.cs
- WinEventQueueItem.cs
- HttpCacheVaryByContentEncodings.cs
- ApplicationFileCodeDomTreeGenerator.cs
- AggregateNode.cs
- ListBase.cs
- StackSpiller.Generated.cs
- CodeCompileUnit.cs
- InstanceDescriptor.cs
- XamlFilter.cs
- WebPartsPersonalization.cs
- LayoutEditorPart.cs
- XPathNodeInfoAtom.cs
- WebPartDeleteVerb.cs
- SendMailErrorEventArgs.cs
- DataStreams.cs
- Line.cs
- InstanceOwnerException.cs
- ExitEventArgs.cs