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
- InplaceBitmapMetadataWriter.cs
- ExtensionQuery.cs
- AttachmentService.cs
- HwndHostAutomationPeer.cs
- PropertyGridCommands.cs
- XmlDocumentFieldSchema.cs
- XsltCompileContext.cs
- OleCmdHelper.cs
- EvidenceBase.cs
- DesignerCapabilities.cs
- XmlSchemaSimpleContentExtension.cs
- MatrixTransform3D.cs
- Panel.cs
- LinearKeyFrames.cs
- UpdatePanelControlTrigger.cs
- ConstNode.cs
- WindowsAuthenticationModule.cs
- URLString.cs
- UpDownEvent.cs
- TypeInitializationException.cs
- RequestBringIntoViewEventArgs.cs
- Attachment.cs
- PackWebResponse.cs
- SafeBitVector32.cs
- DispatcherExceptionFilterEventArgs.cs
- NextPreviousPagerField.cs
- TextEditorSelection.cs
- ArrayElementGridEntry.cs
- SmiXetterAccessMap.cs
- DBPropSet.cs
- TextAction.cs
- TemplateBuilder.cs
- Win32.cs
- KeyManager.cs
- XmlSchemaDatatype.cs
- ImmutableObjectAttribute.cs
- CustomAttributeFormatException.cs
- HtmlInputImage.cs
- BinaryMethodMessage.cs
- RelatedEnd.cs
- DataViewSettingCollection.cs
- TextParaLineResult.cs
- NativeMethods.cs
- TreeNodeClickEventArgs.cs
- ContravarianceAdapter.cs
- ImageListUtils.cs
- PenContext.cs
- StringBuilder.cs
- FunctionImportElement.cs
- OracleConnection.cs
- DetailsViewPageEventArgs.cs
- BaseCollection.cs
- ConversionValidationRule.cs
- DesignerDataView.cs
- ServiceOperation.cs
- Internal.cs
- CompoundFileDeflateTransform.cs
- Document.cs
- PolicyConversionContext.cs
- Rect3DValueSerializer.cs
- HttpInputStream.cs
- ClipboardData.cs
- BinaryExpressionHelper.cs
- Point3DConverter.cs
- UrlAuthorizationModule.cs
- Scene3D.cs
- MouseOverProperty.cs
- XMLUtil.cs
- ParserStack.cs
- HttpCookiesSection.cs
- NullableConverter.cs
- WebPartEditVerb.cs
- AlignmentXValidation.cs
- DesignTimeXamlWriter.cs
- RemoteWebConfigurationHostServer.cs
- ToolStripHighContrastRenderer.cs
- PrivateFontCollection.cs
- GridViewUpdatedEventArgs.cs
- DbParameterCollection.cs
- querybuilder.cs
- SessionIDManager.cs
- SqlVersion.cs
- XpsSerializationException.cs
- DataGridPageChangedEventArgs.cs
- Logging.cs
- CellParagraph.cs
- HtmlTitle.cs
- MenuItem.cs
- EdmProviderManifest.cs
- PerformanceCounterPermission.cs
- URLString.cs
- ConfigurationElementCollection.cs
- DataGridViewLinkColumn.cs
- Win32KeyboardDevice.cs
- SafeUserTokenHandle.cs
- XmlStreamNodeWriter.cs
- ProviderUtil.cs
- ISO2022Encoding.cs
- MultilineStringConverter.cs
- GridViewUpdateEventArgs.cs