Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- FormViewDeleteEventArgs.cs
- VisualTreeUtils.cs
- XmlSchemaCollection.cs
- SQLDecimalStorage.cs
- SortDescriptionCollection.cs
- MsmqBindingFilter.cs
- storepermission.cs
- ToolStripDropDownClosedEventArgs.cs
- TabPanel.cs
- FilteredXmlReader.cs
- BufferModesCollection.cs
- TextBox.cs
- TextInfo.cs
- SuppressIldasmAttribute.cs
- UpnEndpointIdentity.cs
- ParserContext.cs
- ClientConfigurationSystem.cs
- BufferedStream.cs
- CodePageUtils.cs
- TrackingServices.cs
- XmlIlGenerator.cs
- SQLUtility.cs
- ConfigurationElementCollection.cs
- TextProviderWrapper.cs
- TdsParserHelperClasses.cs
- StateChangeEvent.cs
- CommandHelper.cs
- Helpers.cs
- RunInstallerAttribute.cs
- ChildChangedEventArgs.cs
- XmlSerializationWriter.cs
- RowSpanVector.cs
- TextSimpleMarkerProperties.cs
- IncrementalReadDecoders.cs
- SqlDataSourceConnectionPanel.cs
- Int32Collection.cs
- IResourceProvider.cs
- LocalizationComments.cs
- Drawing.cs
- Validator.cs
- ManagementEventWatcher.cs
- AssemblyInfo.cs
- UIElement.cs
- mediaclock.cs
- ResolveInfo.cs
- SmtpReplyReaderFactory.cs
- ActivityStateRecord.cs
- XamlFilter.cs
- EncodingDataItem.cs
- ImageClickEventArgs.cs
- CustomErrorsSectionWrapper.cs
- PixelShader.cs
- BoundField.cs
- SqlBuffer.cs
- ProxyManager.cs
- BatchServiceHost.cs
- SvcMapFileLoader.cs
- UnionCqlBlock.cs
- SchemaComplexType.cs
- EventWaitHandleSecurity.cs
- XPathParser.cs
- FontFamily.cs
- CacheAxisQuery.cs
- CapabilitiesUse.cs
- SmtpReplyReader.cs
- ADRoleFactoryConfiguration.cs
- TraceShell.cs
- WindowsPen.cs
- KnownBoxes.cs
- ElementHostPropertyMap.cs
- DockPattern.cs
- ToolStripMenuItemCodeDomSerializer.cs
- ConfigurationSectionGroup.cs
- UdpMessageProperty.cs
- TextRange.cs
- BuildProvidersCompiler.cs
- EpmContentSerializerBase.cs
- AutomationPatternInfo.cs
- FilterFactory.cs
- XPathNodeHelper.cs
- MarkupExtensionParser.cs
- TCEAdapterGenerator.cs
- Journaling.cs
- HttpContextServiceHost.cs
- SelectionEditor.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- PerformanceCounterPermissionAttribute.cs
- HybridDictionary.cs
- SelectionPattern.cs
- StringKeyFrameCollection.cs
- UpdatePanelTriggerCollection.cs
- WeakHashtable.cs
- sqlinternaltransaction.cs
- DoubleAnimationUsingKeyFrames.cs
- SerializerWriterEventHandlers.cs
- MD5.cs
- SerialReceived.cs
- Brush.cs
- WaitHandle.cs
- CheckedListBox.cs