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
- SafeEventLogReadHandle.cs
- ClientTargetSection.cs
- LinkButton.cs
- WebCategoryAttribute.cs
- ComponentDispatcher.cs
- QueryRewriter.cs
- CommandLibraryHelper.cs
- RsaKeyIdentifierClause.cs
- PointHitTestParameters.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- DynamicDocumentPaginator.cs
- HttpDebugHandler.cs
- XmlSigningNodeWriter.cs
- Matrix3DValueSerializer.cs
- SqlServer2KCompatibilityAnnotation.cs
- URI.cs
- RSAPKCS1KeyExchangeFormatter.cs
- CodeTypeDeclarationCollection.cs
- StreamResourceInfo.cs
- XmlUnspecifiedAttribute.cs
- StorageComplexPropertyMapping.cs
- WebCategoryAttribute.cs
- EncodingNLS.cs
- BlockUIContainer.cs
- MatrixTransform3D.cs
- WSSecureConversationDec2005.cs
- StringUtil.cs
- StatusBar.cs
- X509ChainElement.cs
- CommandID.cs
- WasHostedComPlusFactory.cs
- PageEventArgs.cs
- XomlCompilerHelpers.cs
- MatrixValueSerializer.cs
- IssuedTokenClientBehaviorsElement.cs
- XomlCompilerHelpers.cs
- GridViewRow.cs
- PrePostDescendentsWalker.cs
- Attributes.cs
- ScalarType.cs
- SqlParameter.cs
- UserInitiatedNavigationPermission.cs
- SystemResources.cs
- TabRenderer.cs
- RemoveStoryboard.cs
- Int32Rect.cs
- AncillaryOps.cs
- WebPartCloseVerb.cs
- BasicHttpMessageSecurity.cs
- SourceCollection.cs
- OleDbTransaction.cs
- ParameterModifier.cs
- ModuleBuilderData.cs
- XmlDomTextWriter.cs
- BinaryWriter.cs
- TextTreeText.cs
- CorrelationTokenTypeConvertor.cs
- RuntimeWrappedException.cs
- Application.cs
- XmlSecureResolver.cs
- Domain.cs
- UIElementCollection.cs
- WmlPhoneCallAdapter.cs
- MarkupProperty.cs
- ConfigXmlWhitespace.cs
- EndpointNotFoundException.cs
- PrePrepareMethodAttribute.cs
- BinaryObjectWriter.cs
- Main.cs
- FrameworkEventSource.cs
- EntityClassGenerator.cs
- DBParameter.cs
- SaveLedgerEntryRequest.cs
- InvariantComparer.cs
- NativeMethods.cs
- Function.cs
- LinkedList.cs
- WebRequestModulesSection.cs
- XPathSelfQuery.cs
- ClientUrlResolverWrapper.cs
- WindowsRebar.cs
- TextTreePropertyUndoUnit.cs
- ProcessModuleCollection.cs
- LiteralControl.cs
- ProjectionCamera.cs
- HotSpot.cs
- DefaultBinder.cs
- TheQuery.cs
- OdbcParameterCollection.cs
- PersonalizationProvider.cs
- X509CertificateClaimSet.cs
- ProfessionalColors.cs
- FixedTextSelectionProcessor.cs
- IIS7WorkerRequest.cs
- ReferenceService.cs
- UdpContractFilterBehavior.cs
- File.cs
- DragDropHelper.cs
- FixedDocumentSequencePaginator.cs
- Stylus.cs