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
- TemplateBindingExtensionConverter.cs
- ParserHooks.cs
- AutomationPropertyInfo.cs
- DataRecordObjectView.cs
- OdbcTransaction.cs
- NavigationExpr.cs
- TableDetailsRow.cs
- EventLogPermissionAttribute.cs
- ReadWriteObjectLock.cs
- XmlUtil.cs
- DtcInterfaces.cs
- ComplexLine.cs
- AuthenticateEventArgs.cs
- DesignTimeParseData.cs
- MSAANativeProvider.cs
- mediapermission.cs
- SqlResolver.cs
- WebPartMinimizeVerb.cs
- TemplateParser.cs
- XmlWrappingReader.cs
- _CacheStreams.cs
- SqlErrorCollection.cs
- SqlDataSourceCommandEventArgs.cs
- Command.cs
- IndexOutOfRangeException.cs
- DataGridLinkButton.cs
- ThreadNeutralSemaphore.cs
- ProviderConnectionPoint.cs
- DiscoveryEndpoint.cs
- HierarchicalDataSourceConverter.cs
- tibetanshape.cs
- Byte.cs
- RestClientProxyHandler.cs
- ThreadExceptionDialog.cs
- AssemblyFilter.cs
- TextTreeTextBlock.cs
- SamlAssertionKeyIdentifierClause.cs
- RolePrincipal.cs
- StagingAreaInputItem.cs
- DataControlButton.cs
- ProjectionCamera.cs
- PngBitmapEncoder.cs
- PersianCalendar.cs
- WebPartMinimizeVerb.cs
- ScriptControl.cs
- StringCollection.cs
- Dispatcher.cs
- CustomWebEventKey.cs
- FormClosedEvent.cs
- CodeDirectoryCompiler.cs
- _NegoStream.cs
- BooleanSwitch.cs
- EpmCustomContentDeSerializer.cs
- IgnoreSection.cs
- SynchronizedDispatch.cs
- SqlProfileProvider.cs
- NativeMethodsCLR.cs
- GroupDescription.cs
- ValueType.cs
- QueryStatement.cs
- CollectionMarkupSerializer.cs
- ConfigXmlSignificantWhitespace.cs
- ProbeMatches11.cs
- RequestNavigateEventArgs.cs
- QueryCacheKey.cs
- SignedXmlDebugLog.cs
- MediaCommands.cs
- AppDomain.cs
- ConfigXmlWhitespace.cs
- DocumentSequence.cs
- ControlBindingsCollection.cs
- TextProperties.cs
- InputLangChangeEvent.cs
- MatrixCamera.cs
- UseAttributeSetsAction.cs
- objectresult_tresulttype.cs
- Decimal.cs
- Part.cs
- HandleExceptionArgs.cs
- TransformedBitmap.cs
- PropertyTab.cs
- TextEndOfLine.cs
- QuerySelectOp.cs
- ComponentConverter.cs
- PeerName.cs
- AddingNewEventArgs.cs
- ConfigurationPermission.cs
- UrlMapping.cs
- SaveFileDialog.cs
- AllMembershipCondition.cs
- XPathDocument.cs
- HttpHandlerAction.cs
- Int32RectConverter.cs
- BufferModesCollection.cs
- DocumentReferenceCollection.cs
- SymbolEqualComparer.cs
- Publisher.cs
- LocatorPartList.cs
- SkipStoryboardToFill.cs
- XmlILStorageConverter.cs