Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Configuration / System / Configuration / ConfigurationPropertyAttribute.cs / 1 / ConfigurationPropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Configuration.Internal; using System.Collections; using System.Collections.Specialized; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Security.Permissions; using System.Xml; using System.Globalization; using System.ComponentModel; using System.Security; using System.Text; namespace System.Configuration { [AttributeUsage(AttributeTargets.Property)] public sealed class ConfigurationPropertyAttribute : Attribute { internal static readonly String DefaultCollectionPropertyName = ""; private String _Name; private object _DefaultValue = ConfigurationElement.s_nullPropertyValue; private ConfigurationPropertyOptions _Flags = ConfigurationPropertyOptions.None; public ConfigurationPropertyAttribute(String name) { _Name = name; } public String Name { get { return _Name; } } public object DefaultValue { get { return _DefaultValue; } set { _DefaultValue = value; } } public ConfigurationPropertyOptions Options { get { return _Flags; } set { _Flags = value; } } public bool IsDefaultCollection { get { return ((Options & ConfigurationPropertyOptions.IsDefaultCollection) != 0); } set { if (value == true) { Options |= ConfigurationPropertyOptions.IsDefaultCollection; } else Options &= ~ConfigurationPropertyOptions.IsDefaultCollection; } } public bool IsRequired { get { return ((Options & ConfigurationPropertyOptions.IsRequired) != 0); } set { if (value == true) { Options |= ConfigurationPropertyOptions.IsRequired; } else { Options &= ~ConfigurationPropertyOptions.IsRequired; } } } public bool IsKey { get { return ((Options & ConfigurationPropertyOptions.IsKey) != 0); } set { if (value == true) { Options |= ConfigurationPropertyOptions.IsKey; } else { Options &= ~ConfigurationPropertyOptions.IsKey; } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Configuration.Internal; using System.Collections; using System.Collections.Specialized; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Security.Permissions; using System.Xml; using System.Globalization; using System.ComponentModel; using System.Security; using System.Text; namespace System.Configuration { [AttributeUsage(AttributeTargets.Property)] public sealed class ConfigurationPropertyAttribute : Attribute { internal static readonly String DefaultCollectionPropertyName = ""; private String _Name; private object _DefaultValue = ConfigurationElement.s_nullPropertyValue; private ConfigurationPropertyOptions _Flags = ConfigurationPropertyOptions.None; public ConfigurationPropertyAttribute(String name) { _Name = name; } public String Name { get { return _Name; } } public object DefaultValue { get { return _DefaultValue; } set { _DefaultValue = value; } } public ConfigurationPropertyOptions Options { get { return _Flags; } set { _Flags = value; } } public bool IsDefaultCollection { get { return ((Options & ConfigurationPropertyOptions.IsDefaultCollection) != 0); } set { if (value == true) { Options |= ConfigurationPropertyOptions.IsDefaultCollection; } else Options &= ~ConfigurationPropertyOptions.IsDefaultCollection; } } public bool IsRequired { get { return ((Options & ConfigurationPropertyOptions.IsRequired) != 0); } set { if (value == true) { Options |= ConfigurationPropertyOptions.IsRequired; } else { Options &= ~ConfigurationPropertyOptions.IsRequired; } } } public bool IsKey { get { return ((Options & ConfigurationPropertyOptions.IsKey) != 0); } set { if (value == true) { Options |= ConfigurationPropertyOptions.IsKey; } else { Options &= ~ConfigurationPropertyOptions.IsKey; } } } } } // 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
- WebBrowserContainer.cs
- SignedXml.cs
- ContentValidator.cs
- ClientSettingsStore.cs
- LoginCancelEventArgs.cs
- Convert.cs
- CompilationRelaxations.cs
- SerialErrors.cs
- ArrayConverter.cs
- ItemDragEvent.cs
- WindowsTab.cs
- AstNode.cs
- SmiEventStream.cs
- XmlJsonReader.cs
- EmptyReadOnlyDictionaryInternal.cs
- SignedInfo.cs
- SectionXmlInfo.cs
- QfeChecker.cs
- ParameterToken.cs
- SslStreamSecurityElement.cs
- SqlReferenceCollection.cs
- DrawingContextWalker.cs
- BinHexDecoder.cs
- EnvelopedPkcs7.cs
- DataObject.cs
- HtmlTableRow.cs
- NumericUpDownAcceleration.cs
- PeerObject.cs
- DockEditor.cs
- Executor.cs
- StreamInfo.cs
- XamlWriter.cs
- SafeLocalAllocation.cs
- EntityTypeEmitter.cs
- FontEmbeddingManager.cs
- GPRECTF.cs
- DataTableNewRowEvent.cs
- ErrorActivity.cs
- JoinTreeNode.cs
- CommonBehaviorsSection.cs
- ExpandedWrapper.cs
- HtmlInputReset.cs
- CustomAssemblyResolver.cs
- VisualBrush.cs
- WorkerRequest.cs
- DataConnectionHelper.cs
- InputReferenceExpression.cs
- DrawingContextDrawingContextWalker.cs
- TreeNodeStyleCollection.cs
- SizeValueSerializer.cs
- COM2PictureConverter.cs
- RemoteWebConfigurationHostServer.cs
- DataGridRow.cs
- X509Utils.cs
- RegexWriter.cs
- SafeSecurityHandles.cs
- ScrollItemProviderWrapper.cs
- SpellCheck.cs
- ServiceNameElement.cs
- ConstructorExpr.cs
- XmlUtf8RawTextWriter.cs
- SqlNotificationRequest.cs
- Separator.cs
- initElementDictionary.cs
- IPGlobalProperties.cs
- WebResourceAttribute.cs
- DependencyObject.cs
- GridLength.cs
- storagemappingitemcollection.viewdictionary.cs
- IList.cs
- Vector.cs
- RootBrowserWindowAutomationPeer.cs
- SystemBrushes.cs
- KerberosReceiverSecurityToken.cs
- GridViewCellAutomationPeer.cs
- SystemWebSectionGroup.cs
- HtmlInputText.cs
- FirstMatchCodeGroup.cs
- XmlObjectSerializer.cs
- DesignerActionKeyboardBehavior.cs
- XmlIlVisitor.cs
- SignatureResourcePool.cs
- ListViewPagedDataSource.cs
- CompositeFontInfo.cs
- ActivitiesCollection.cs
- ByteAnimationBase.cs
- TableLayoutRowStyleCollection.cs
- HelpEvent.cs
- SoapReflectionImporter.cs
- _ChunkParse.cs
- WorkflowMarkupSerializationProvider.cs
- ExpandButtonVisibilityConverter.cs
- XPathItem.cs
- ToolStripRenderer.cs
- CorrelationActionMessageFilter.cs
- OutputCache.cs
- StylusButton.cs
- SynchronizedChannelCollection.cs
- Blend.cs
- AsyncPostBackTrigger.cs