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
- DataServiceConfiguration.cs
- DrawingContextWalker.cs
- XmlCountingReader.cs
- ListViewSortEventArgs.cs
- TdsValueSetter.cs
- GlobalizationAssembly.cs
- EnterpriseServicesHelper.cs
- HTMLTextWriter.cs
- SQLDecimal.cs
- IItemProperties.cs
- CatalogPartChrome.cs
- EntityDataSourceContainerNameItem.cs
- ContentWrapperAttribute.cs
- RichTextBoxDesigner.cs
- Stroke2.cs
- SafeBitVector32.cs
- UnitySerializationHolder.cs
- SetMemberBinder.cs
- QueryConverter.cs
- AnnotationDocumentPaginator.cs
- DefaultValidator.cs
- ApplicationSecurityManager.cs
- UserPreferenceChangingEventArgs.cs
- ElementInit.cs
- XmlSchemaSequence.cs
- TaiwanCalendar.cs
- BuilderPropertyEntry.cs
- CompiledELinqQueryState.cs
- Int32Collection.cs
- HttpFormatExtensions.cs
- _ProxyRegBlob.cs
- XmlDesignerDataSourceView.cs
- ReadOnlyObservableCollection.cs
- ToolboxComponentsCreatingEventArgs.cs
- ServiceSecurityAuditElement.cs
- CriticalHandle.cs
- EntityDesignerBuildProvider.cs
- Int32Rect.cs
- HashCodeCombiner.cs
- HashCodeCombiner.cs
- VScrollBar.cs
- ReflectPropertyDescriptor.cs
- ColumnWidthChangingEvent.cs
- MultitargetingHelpers.cs
- SourceSwitch.cs
- CellParagraph.cs
- FixedFlowMap.cs
- XmlHierarchicalEnumerable.cs
- MappingItemCollection.cs
- RowParagraph.cs
- PreservationFileWriter.cs
- InputScopeManager.cs
- Message.cs
- ModulesEntry.cs
- DataConnectionHelper.cs
- ProtectedConfigurationSection.cs
- TextEditor.cs
- DataPointer.cs
- UInt16Converter.cs
- CodeCompileUnit.cs
- BaseServiceProvider.cs
- EndOfStreamException.cs
- TypeSystem.cs
- HelpEvent.cs
- ReadOnlyDictionary.cs
- MenuItemStyleCollection.cs
- WasEndpointConfigContainer.cs
- complextypematerializer.cs
- CodeRegionDirective.cs
- SafeLibraryHandle.cs
- XmlSchemaNotation.cs
- ListViewHitTestInfo.cs
- ServiceDurableInstance.cs
- Missing.cs
- SqlTrackingQuery.cs
- DetailsViewRowCollection.cs
- ItemDragEvent.cs
- ImportOptions.cs
- HighlightVisual.cs
- GuidConverter.cs
- HttpChannelHelpers.cs
- CalendarDay.cs
- Splitter.cs
- EditorPartCollection.cs
- TreeViewItem.cs
- ImageDesigner.cs
- GridToolTip.cs
- GCHandleCookieTable.cs
- __Filters.cs
- validationstate.cs
- TextEffectResolver.cs
- LoadGrammarCompletedEventArgs.cs
- DependencyPropertyHelper.cs
- VectorCollectionValueSerializer.cs
- FeatureSupport.cs
- XamlGridLengthSerializer.cs
- DetailsViewUpdateEventArgs.cs
- BufferAllocator.cs
- RoleManagerModule.cs
- PageHandlerFactory.cs