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
- SelectionUIHandler.cs
- MediaTimeline.cs
- HashCodeCombiner.cs
- SessionMode.cs
- XmlSerializerObjectSerializer.cs
- ModuleBuilderData.cs
- CalendarKeyboardHelper.cs
- RecognizerStateChangedEventArgs.cs
- ReferenceEqualityComparer.cs
- HitTestParameters3D.cs
- StateMachineTimers.cs
- PropertyEmitter.cs
- ObjectReaderCompiler.cs
- DurableInstance.cs
- CircleHotSpot.cs
- TextEditorSelection.cs
- RandomNumberGenerator.cs
- HighContrastHelper.cs
- Regex.cs
- GeneralTransform3DGroup.cs
- ConstraintManager.cs
- ExpandedWrapper.cs
- InnerItemCollectionView.cs
- RequestResizeEvent.cs
- BindingListCollectionView.cs
- Rectangle.cs
- X509ClientCertificateCredentialsElement.cs
- ActivityCodeDomSerializationManager.cs
- NotifyParentPropertyAttribute.cs
- WebPartConnectionCollection.cs
- RegexGroupCollection.cs
- Buffer.cs
- SizeAnimationBase.cs
- BindingObserver.cs
- ScriptReference.cs
- XmlSchemaAttributeGroupRef.cs
- PrimitiveType.cs
- RTLAwareMessageBox.cs
- DbConnectionPool.cs
- SqlDependency.cs
- DataGridViewCellStyleConverter.cs
- NoResizeSelectionBorderGlyph.cs
- MenuItem.cs
- FilterQuery.cs
- Line.cs
- AliasGenerator.cs
- ClientBuildManagerCallback.cs
- ParserContext.cs
- UpdateProgress.cs
- RequestQueue.cs
- WindowsAuthenticationEventArgs.cs
- Util.cs
- FixedSOMPageConstructor.cs
- SelectionPatternIdentifiers.cs
- WindowsFormsLinkLabel.cs
- XPathCompileException.cs
- SoapIgnoreAttribute.cs
- CodeTryCatchFinallyStatement.cs
- SimpleParser.cs
- MouseWheelEventArgs.cs
- HeaderedItemsControl.cs
- XmlNavigatorStack.cs
- AmbientEnvironment.cs
- TransformCryptoHandle.cs
- PageHandlerFactory.cs
- BitmapEffectDrawing.cs
- WebPartVerbsEventArgs.cs
- Vector3DValueSerializer.cs
- Helper.cs
- ResourceDefaultValueAttribute.cs
- BrowserCapabilitiesCodeGenerator.cs
- XmlSignificantWhitespace.cs
- CellQuery.cs
- RankException.cs
- Rect3D.cs
- Attributes.cs
- WmlImageAdapter.cs
- KeyTimeConverter.cs
- EncryptedKey.cs
- HttpResponse.cs
- XMLSyntaxException.cs
- TextStore.cs
- ObfuscationAttribute.cs
- Predicate.cs
- DisplayInformation.cs
- TakeQueryOptionExpression.cs
- SortExpressionBuilder.cs
- ApplicationSettingsBase.cs
- Itemizer.cs
- HGlobalSafeHandle.cs
- TimersDescriptionAttribute.cs
- XmlDownloadManager.cs
- TdsRecordBufferSetter.cs
- RemotingServices.cs
- Positioning.cs
- SafeCancelMibChangeNotify.cs
- XmlQueryType.cs
- DataSourceCache.cs
- EventBuilder.cs
- AsynchronousChannelMergeEnumerator.cs