Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigurationPropertyAttribute.cs / 1305376 / 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 { // disable csharp compiler warning #0414: field assigned unused value #pragma warning disable 0414 internal static readonly String DefaultCollectionPropertyName = ""; #pragma warning restore 0414 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
- Typeface.cs
- FrameworkContentElement.cs
- WindowsGraphicsWrapper.cs
- ScriptResourceAttribute.cs
- Geometry3D.cs
- NameValueFileSectionHandler.cs
- DataGridColumnCollection.cs
- ServiceOperationViewControl.cs
- FormViewInsertEventArgs.cs
- WindowsAltTab.cs
- ChildChangedEventArgs.cs
- DataViewManager.cs
- RectAnimationBase.cs
- ArraySubsetEnumerator.cs
- TemplatePropertyEntry.cs
- UInt16Storage.cs
- DrawingGroup.cs
- OracleDateTime.cs
- SqlDataSourceStatusEventArgs.cs
- DBProviderConfigurationHandler.cs
- ButtonFieldBase.cs
- TemplateParser.cs
- EditorPartChrome.cs
- Mapping.cs
- PtsContext.cs
- EmbeddedMailObjectsCollection.cs
- SafeRightsManagementEnvironmentHandle.cs
- StringBuilder.cs
- XmlRootAttribute.cs
- Event.cs
- Codec.cs
- ListParagraph.cs
- ZipIOExtraFieldPaddingElement.cs
- WeakReadOnlyCollection.cs
- ViewStateException.cs
- AppDomainProtocolHandler.cs
- EntityTypeBase.cs
- WpfPayload.cs
- TemplateParser.cs
- SignedXml.cs
- ellipse.cs
- QilVisitor.cs
- GorillaCodec.cs
- ToolBarTray.cs
- SmiXetterAccessMap.cs
- ContentType.cs
- DesignTimeVisibleAttribute.cs
- TogglePattern.cs
- CannotUnloadAppDomainException.cs
- ApplyTemplatesAction.cs
- BindingMemberInfo.cs
- GACIdentityPermission.cs
- DocumentXPathNavigator.cs
- WebPartEditorApplyVerb.cs
- PenContexts.cs
- IndexOutOfRangeException.cs
- EntityFunctions.cs
- Sentence.cs
- Vector3DAnimationUsingKeyFrames.cs
- TextEditorTables.cs
- FileUtil.cs
- SizeAnimationUsingKeyFrames.cs
- Vector3DKeyFrameCollection.cs
- DataBoundControl.cs
- AuthenticationException.cs
- ScriptResourceHandler.cs
- SqlDuplicator.cs
- TransformPattern.cs
- CriticalFinalizerObject.cs
- MonthCalendarDesigner.cs
- DoubleAnimationUsingPath.cs
- validationstate.cs
- FormatVersion.cs
- GeometryValueSerializer.cs
- RecordsAffectedEventArgs.cs
- RoutedCommand.cs
- ProfileSettingsCollection.cs
- ClientSettingsStore.cs
- MissingMethodException.cs
- HMAC.cs
- HostingEnvironment.cs
- SamlAdvice.cs
- TabControl.cs
- DataGridColumn.cs
- HistoryEventArgs.cs
- Int64Storage.cs
- RemotingClientProxy.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- DataGridPageChangedEventArgs.cs
- MarshalByValueComponent.cs
- XPathException.cs
- IncrementalCompileAnalyzer.cs
- WindowsServiceElement.cs
- ExpressionBuilder.cs
- SchemaImporterExtensionElement.cs
- FontCacheUtil.cs
- CompiledELinqQueryState.cs
- HttpWriter.cs
- DocobjHost.cs
- SqlNodeAnnotation.cs