Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- LinearQuaternionKeyFrame.cs
- XmlDictionaryString.cs
- LinearGradientBrush.cs
- XmlSchemaSimpleTypeUnion.cs
- WithStatement.cs
- ScriptControlManager.cs
- PropertyPath.cs
- QilXmlWriter.cs
- CellParagraph.cs
- CompiledAction.cs
- StringComparer.cs
- AppDomainProtocolHandler.cs
- IdnElement.cs
- DecimalConstantAttribute.cs
- EmptyEnumerator.cs
- ISFClipboardData.cs
- TypeBuilder.cs
- SnapLine.cs
- RestHandlerFactory.cs
- ToolStripItemRenderEventArgs.cs
- Model3DGroup.cs
- hresults.cs
- ClientSettingsProvider.cs
- MediaPlayer.cs
- FixedPosition.cs
- FlowLayoutPanel.cs
- EditorAttribute.cs
- Stroke.cs
- HostingEnvironmentException.cs
- DesignerView.cs
- XmlLanguage.cs
- TextDocumentView.cs
- ExpressionEditorAttribute.cs
- PreparingEnlistment.cs
- AudioBase.cs
- MessageEventSubscriptionService.cs
- TextLineResult.cs
- SqlSelectClauseBuilder.cs
- CountdownEvent.cs
- TableLayoutStyleCollection.cs
- SmiContextFactory.cs
- ObjectQueryExecutionPlan.cs
- mediapermission.cs
- MetadataSerializer.cs
- EventLevel.cs
- ForeignConstraint.cs
- CultureInfoConverter.cs
- ProcessThreadCollection.cs
- SoapEnvelopeProcessingElement.cs
- TreeBuilder.cs
- RemotingServices.cs
- PeerCustomResolverSettings.cs
- MulticastOption.cs
- GlobalAllocSafeHandle.cs
- storepermissionattribute.cs
- TcpChannelFactory.cs
- LogicalTreeHelper.cs
- CultureInfoConverter.cs
- ContractInferenceHelper.cs
- XmlWriterTraceListener.cs
- SetIterators.cs
- LineBreakRecord.cs
- SqlDataReaderSmi.cs
- XmlWhitespace.cs
- IEnumerable.cs
- DiscoveryEndpointValidator.cs
- XmlSignatureManifest.cs
- CloudCollection.cs
- MdImport.cs
- MatrixAnimationUsingKeyFrames.cs
- SoapEnvelopeProcessingElement.cs
- BufferBuilder.cs
- SizeAnimationUsingKeyFrames.cs
- ColumnPropertiesGroup.cs
- ObjectViewListener.cs
- safelinkcollection.cs
- TransportContext.cs
- SchemaType.cs
- UnSafeCharBuffer.cs
- AddDataControlFieldDialog.cs
- ServiceHostingEnvironment.cs
- NativeMethods.cs
- EmbossBitmapEffect.cs
- StoreItemCollection.cs
- Quaternion.cs
- Function.cs
- PerformanceCounterLib.cs
- XdrBuilder.cs
- GridViewUpdatedEventArgs.cs
- BrowserCapabilitiesFactoryBase.cs
- XslException.cs
- _ServiceNameStore.cs
- StringFormat.cs
- ADMembershipProvider.cs
- ObjectConverter.cs
- VectorValueSerializer.cs
- AbsoluteQuery.cs
- EllipseGeometry.cs
- FilterElement.cs
- MasterPage.cs