Show / Hide Table of Contents

    Class AttributeUsageAttribute

    Specifies the usage of another attribute class. This class cannot be inherited.

    Inheritance
    Object
    Attribute
    AttributeUsageAttribute
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: System
    Assembly: mscorlib.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class)]
    public sealed class AttributeUsageAttribute : Attribute

    Constructors

    | Improve this Doc View Source

    AttributeUsageAttribute(AttributeTargets)

    Initializes a new instance of the AttributeUsageAttribute class with the specified list of AttributeTargets, the AllowMultiple value, and the Inherited value.

    Declaration
    public AttributeUsageAttribute(AttributeTargets validOn)
    Parameters
    Type Name Description
    AttributeTargets validOn

    The set of values combined using a bitwise OR operation to indicate which program elements are valid.

    Properties

    | Improve this Doc View Source

    AllowMultiple

    Gets or sets a Boolean value indicating whether more than one instance of the indicated attribute can be specified for a single program element.

    Declaration
    public bool AllowMultiple { get; set; }
    Property Value
    Type Description
    Boolean

    true if more than one instance is allowed to be specified; otherwise, false. The default is false.

    | Improve this Doc View Source

    Inherited

    Gets or sets a Boolean value that determines whether the indicated attribute is inherited by derived classes and overriding members.

    Declaration
    public bool Inherited { get; set; }
    Property Value
    Type Description
    Boolean

    true if the attribute can be inherited by derived classes and overriding members; otherwise, false. The default is true.

    | Improve this Doc View Source

    ValidOn

    Gets a set of values identifying which program elements that the indicated attribute can be applied to.

    Declaration
    public AttributeTargets ValidOn { get; }
    Property Value
    Type Description
    AttributeTargets

    One or several AttributeTargets values. The default is All.

    Extension Methods

    LogDispatcher.GetCurrentClassLogger(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 nanoFramework Contributors
    Generated by DocFX