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
- FormViewRow.cs
- EntityDataSourceUtil.cs
- IisTraceListener.cs
- ListViewItemEventArgs.cs
- UIPermission.cs
- ManualResetEvent.cs
- CodeTryCatchFinallyStatement.cs
- Guid.cs
- PaintEvent.cs
- JsonMessageEncoderFactory.cs
- XmlAutoDetectWriter.cs
- ISCIIEncoding.cs
- namescope.cs
- CodeCommentStatementCollection.cs
- DrawingVisual.cs
- ToolBar.cs
- EntityContainer.cs
- BamlTreeMap.cs
- PathSegmentCollection.cs
- PrintDialogException.cs
- RequestCacheValidator.cs
- DrawingServices.cs
- TypeSystem.cs
- DataContext.cs
- InternalCache.cs
- _Win32.cs
- ChunkedMemoryStream.cs
- Debug.cs
- MinimizableAttributeTypeConverter.cs
- PackageDigitalSignatureManager.cs
- BitmapPalette.cs
- DataTemplateSelector.cs
- WorkflowInstanceAbortedRecord.cs
- ContainerVisual.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- HtmlImageAdapter.cs
- CorePropertiesFilter.cs
- SplineKeyFrames.cs
- SourceInterpreter.cs
- NamespaceExpr.cs
- ConnectionManagementElement.cs
- LinkClickEvent.cs
- SimplePropertyEntry.cs
- VerificationAttribute.cs
- DataGridViewControlCollection.cs
- ErrorHandlerFaultInfo.cs
- MailAddressCollection.cs
- BrowserCapabilitiesFactory.cs
- ArrayItemValue.cs
- RemotingAttributes.cs
- FormattedTextSymbols.cs
- HostProtectionException.cs
- EntityContainerAssociationSetEnd.cs
- ReferenceAssemblyAttribute.cs
- XmlSchemaSimpleContentExtension.cs
- SiteMapNodeItem.cs
- RemoteCryptoDecryptRequest.cs
- PropertyGeneratedEventArgs.cs
- ALinqExpressionVisitor.cs
- SqlAliaser.cs
- DataBindingCollection.cs
- EdgeModeValidation.cs
- ScriptBehaviorDescriptor.cs
- StringReader.cs
- GridItemProviderWrapper.cs
- BinaryCommonClasses.cs
- XPathChildIterator.cs
- SQLSingleStorage.cs
- XNodeValidator.cs
- GridSplitterAutomationPeer.cs
- Reference.cs
- SizeConverter.cs
- SqlDataSourceFilteringEventArgs.cs
- ViewBox.cs
- MetafileHeader.cs
- PassportIdentity.cs
- FlowLayoutPanelDesigner.cs
- DockingAttribute.cs
- XmlEnumAttribute.cs
- BindingEditor.xaml.cs
- RelationshipType.cs
- ToolStripItemCollection.cs
- TargetPerspective.cs
- DeviceContext2.cs
- Visitors.cs
- versioninfo.cs
- ConfigurationStrings.cs
- SessionStateModule.cs
- ValidationError.cs
- recordstatefactory.cs
- TypeGeneratedEventArgs.cs
- TreeViewImageIndexConverter.cs
- ContextStack.cs
- HandledEventArgs.cs
- ContractsBCL.cs
- WebControlsSection.cs
- ListQueryResults.cs
- ModelTreeEnumerator.cs
- DriveNotFoundException.cs
- EventDescriptorCollection.cs