Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / AttributeUsageAttribute.cs / 1 / AttributeUsageAttribute.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: AttributeUsageAttribute ** ** ** Purpose: The class denotes how to specify the usage of an attribute ** ** ===========================================================*/ namespace System { using System.Reflection; /* By default, attributes are inherited and multiple attributes are not allowed */ [AttributeUsage(AttributeTargets.Class, Inherited = true),Serializable()] [System.Runtime.InteropServices.ComVisible(true)] public sealed class AttributeUsageAttribute : Attribute { internal AttributeTargets m_attributeTarget = AttributeTargets.All; // Defaults to all internal bool m_allowMultiple = false; // Defaults to false internal bool m_inherited = true; // Defaults to true internal static AttributeUsageAttribute Default = new AttributeUsageAttribute(AttributeTargets.All); //Constructors public AttributeUsageAttribute(AttributeTargets validOn) { m_attributeTarget = validOn; } internal AttributeUsageAttribute(AttributeTargets validOn, bool allowMultiple, bool inherited) { m_attributeTarget = validOn; m_allowMultiple = allowMultiple; m_inherited = inherited; } //Properties public AttributeTargets ValidOn { get{ return m_attributeTarget; } } public bool AllowMultiple { get { return m_allowMultiple; } set { m_allowMultiple = value; } } public bool Inherited { get { return m_inherited; } set { m_inherited = value; } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- VisualBrush.cs
- GPStream.cs
- SqlMethodCallConverter.cs
- X509ServiceCertificateAuthenticationElement.cs
- Quaternion.cs
- cookie.cs
- TextSchema.cs
- XamlFigureLengthSerializer.cs
- DetailsViewUpdateEventArgs.cs
- InternalSafeNativeMethods.cs
- EntityDataSourceContainerNameConverter.cs
- DataGridViewComboBoxCell.cs
- DataSourceCacheDurationConverter.cs
- PropertyOverridesTypeEditor.cs
- Table.cs
- CodeMemberEvent.cs
- QueueNameHelper.cs
- BitmapFrame.cs
- StylusPointDescription.cs
- PassportAuthenticationModule.cs
- GACIdentityPermission.cs
- ItemContainerProviderWrapper.cs
- MenuEventArgs.cs
- DoubleIndependentAnimationStorage.cs
- UncommonField.cs
- EntityDataSourceStatementEditor.cs
- CqlIdentifiers.cs
- PipelineModuleStepContainer.cs
- EventBookmark.cs
- COM2IDispatchConverter.cs
- RequiredFieldValidator.cs
- OutputScopeManager.cs
- Int64AnimationBase.cs
- SafeNativeMethodsMilCoreApi.cs
- XmlLangPropertyAttribute.cs
- GlyphElement.cs
- AttributeProviderAttribute.cs
- dbdatarecord.cs
- ApplicationDirectoryMembershipCondition.cs
- Transform.cs
- XPathDocumentBuilder.cs
- Schema.cs
- RewritingValidator.cs
- DashStyle.cs
- WebPartZoneCollection.cs
- TextElementCollection.cs
- TextTabProperties.cs
- IsolationInterop.cs
- InsufficientMemoryException.cs
- GrammarBuilderRuleRef.cs
- NameScopePropertyAttribute.cs
- JournalEntry.cs
- IArgumentProvider.cs
- CollectionTypeElement.cs
- StyleHelper.cs
- EndpointInfo.cs
- Trace.cs
- ArrayList.cs
- ItemMap.cs
- PackagingUtilities.cs
- XmlSchemaSimpleType.cs
- InternalsVisibleToAttribute.cs
- TranslateTransform3D.cs
- CriticalHandle.cs
- coordinatorscratchpad.cs
- BooleanKeyFrameCollection.cs
- RuntimeArgumentHandle.cs
- DashStyles.cs
- AnnouncementService.cs
- WindowsClaimSet.cs
- ToolStripRenderEventArgs.cs
- MemberHolder.cs
- UdpAnnouncementEndpoint.cs
- SqlClientFactory.cs
- NullableFloatSumAggregationOperator.cs
- AssociativeAggregationOperator.cs
- AmbientValueAttribute.cs
- SharedStatics.cs
- StringKeyFrameCollection.cs
- NativeMethods.cs
- WindowInteropHelper.cs
- WaveHeader.cs
- SystemParameters.cs
- CompiledQuery.cs
- TypeDescriptorFilterService.cs
- PermissionAttributes.cs
- BlurBitmapEffect.cs
- SvcMapFileSerializer.cs
- PipelineModuleStepContainer.cs
- LinkDescriptor.cs
- BindingList.cs
- HyperLinkField.cs
- DataViewManagerListItemTypeDescriptor.cs
- XmlSchemaNotation.cs
- NameValueSectionHandler.cs
- ArgumentException.cs
- ClientCredentialsElement.cs
- OdbcError.cs
- WinEventTracker.cs
- RelationshipNavigation.cs