Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / IgnoreSection.cs / 1305376 / 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
- QilLoop.cs
- DataServiceResponse.cs
- ParallelSeparator.xaml.cs
- COM2EnumConverter.cs
- ControlParameter.cs
- UnsafePeerToPeerMethods.cs
- RequestTimeoutManager.cs
- StylusPointProperty.cs
- InvalidateEvent.cs
- GeneralTransform3D.cs
- _ListenerAsyncResult.cs
- MatrixAnimationBase.cs
- PeerTransportListenAddressConverter.cs
- DataGridViewRowStateChangedEventArgs.cs
- EdmScalarPropertyAttribute.cs
- CustomErrorsSection.cs
- mediaclock.cs
- Wildcard.cs
- CompositeFontInfo.cs
- OleDbConnection.cs
- NavigateUrlConverter.cs
- PackageStore.cs
- BitmapEffectGroup.cs
- StreamResourceInfo.cs
- XmlCompatibilityReader.cs
- WriteableOnDemandPackagePart.cs
- bidPrivateBase.cs
- LinkDescriptor.cs
- SafeMILHandle.cs
- TableLayout.cs
- InkPresenter.cs
- EnumerableRowCollectionExtensions.cs
- ApplicationServiceManager.cs
- EntityViewContainer.cs
- CalculatedColumn.cs
- ProcessInfo.cs
- ImportCatalogPart.cs
- RelationshipManager.cs
- ItemCollection.cs
- ConnectorMovedEventArgs.cs
- GetPageNumberCompletedEventArgs.cs
- SafeNativeMemoryHandle.cs
- RoutedCommand.cs
- SettingsBase.cs
- ThreadStaticAttribute.cs
- SqlBulkCopy.cs
- Label.cs
- Vector3D.cs
- DataGrid.cs
- PolyLineSegmentFigureLogic.cs
- LinkedList.cs
- TextParagraphView.cs
- CommandHelper.cs
- ArgumentNullException.cs
- elementinformation.cs
- AsymmetricKeyExchangeFormatter.cs
- AppDomainCompilerProxy.cs
- ResXResourceReader.cs
- CombinedGeometry.cs
- HtmlTableCell.cs
- OleDbConnection.cs
- WindowsSlider.cs
- SimpleWebHandlerParser.cs
- ListItemConverter.cs
- XmlWhitespace.cs
- NonBatchDirectoryCompiler.cs
- FontCollection.cs
- KnownTypes.cs
- ChangeDirector.cs
- AdornedElementPlaceholder.cs
- JapaneseLunisolarCalendar.cs
- SecuritySessionClientSettings.cs
- recordstate.cs
- Point.cs
- ProcessManager.cs
- ObjectDataSourceFilteringEventArgs.cs
- DesignTimeParseData.cs
- RefType.cs
- FrameworkContextData.cs
- EngineSiteSapi.cs
- TriState.cs
- DirectoryRedirect.cs
- XmlNodeChangedEventArgs.cs
- XmlILTrace.cs
- FilterInvalidBodyAccessException.cs
- FileNotFoundException.cs
- LogRestartAreaEnumerator.cs
- Query.cs
- ChineseLunisolarCalendar.cs
- XmlNodeList.cs
- FormViewCommandEventArgs.cs
- DoubleIndependentAnimationStorage.cs
- StrokeNodeOperations2.cs
- VisualBasicSettingsHandler.cs
- XmlSchemaAnnotation.cs
- PeerNameResolver.cs
- SQLBytes.cs
- DataContract.cs
- ControlBindingsConverter.cs
- PermissionRequestEvidence.cs