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 / IgnoreSection.cs / 1 / IgnoreSection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Xml; sealed public class IgnoreSection : 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 IgnoreSection() { 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; sealed public class IgnoreSection : 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 IgnoreSection() { 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
- SpecialNameAttribute.cs
- PermissionAttributes.cs
- Brush.cs
- CacheChildrenQuery.cs
- HttpGetProtocolImporter.cs
- InfiniteTimeSpanConverter.cs
- ProjectionPath.cs
- XmlSignatureProperties.cs
- DocumentCollection.cs
- EntityDataSourceWrapperCollection.cs
- MatrixTransform.cs
- DataTableExtensions.cs
- OrderedDictionary.cs
- TreeViewItem.cs
- CodeLabeledStatement.cs
- SqlDataSource.cs
- SqlXmlStorage.cs
- CultureSpecificStringDictionary.cs
- CookieHandler.cs
- ListBase.cs
- InvalidDataException.cs
- InstanceCompleteException.cs
- SchemaManager.cs
- WebProxyScriptElement.cs
- RequestCacheEntry.cs
- TextChangedEventArgs.cs
- WorkflowDefinitionContext.cs
- WpfSharedBamlSchemaContext.cs
- DiagnosticsConfiguration.cs
- Mutex.cs
- RightsManagementPermission.cs
- MediaEntryAttribute.cs
- RouteData.cs
- ApplicationSecurityManager.cs
- _UncName.cs
- EntitySetBase.cs
- XmlSchemaAttributeGroup.cs
- OperatingSystem.cs
- SortedList.cs
- SchemaSetCompiler.cs
- SqlDataSourceCustomCommandPanel.cs
- ToolbarAUtomationPeer.cs
- DesignerTransactionCloseEvent.cs
- OptimizerPatterns.cs
- Section.cs
- UserValidatedEventArgs.cs
- LocatorBase.cs
- EncryptedKeyIdentifierClause.cs
- HierarchicalDataBoundControl.cs
- Win32MouseDevice.cs
- NavigationCommands.cs
- TextContainerHelper.cs
- DashStyle.cs
- WebBrowser.cs
- DeviceContext.cs
- ConfigWriter.cs
- SingleResultAttribute.cs
- SizeFConverter.cs
- ServerIdentity.cs
- TraceContext.cs
- HierarchicalDataBoundControl.cs
- HtmlShim.cs
- PolicyManager.cs
- NameObjectCollectionBase.cs
- MessageQueuePermissionEntryCollection.cs
- CompilationUnit.cs
- ResolveNameEventArgs.cs
- ProfilePropertySettingsCollection.cs
- DoubleLinkListEnumerator.cs
- SdlChannelSink.cs
- TransformPattern.cs
- ComPlusInstanceContextInitializer.cs
- oledbconnectionstring.cs
- SaveFileDialog.cs
- ContentPosition.cs
- BitmapEditor.cs
- DropDownList.cs
- StateChangeEvent.cs
- Visual3D.cs
- SegmentInfo.cs
- TableCell.cs
- OutKeywords.cs
- TextElementCollectionHelper.cs
- URIFormatException.cs
- RMEnrollmentPage3.cs
- SerialReceived.cs
- SqlFunctionAttribute.cs
- TdsParserStateObject.cs
- AttachInfo.cs
- BasicCellRelation.cs
- GridViewUpdateEventArgs.cs
- FrameworkElementFactoryMarkupObject.cs
- ContentHostHelper.cs
- KnownTypesProvider.cs
- XPathQilFactory.cs
- Rules.cs
- StubHelpers.cs
- HandlerBase.cs
- TrackBarRenderer.cs
- EncryptedKey.cs