mscorlib(4.0.0.0) API with additions
AttributeUsageAttribute.cs
2 
3 namespace System
4 {
7  [AttributeUsage(AttributeTargets.Class, Inherited = true)]
8  [ComVisible(true)]
9  [__DynamicallyInvokable]
10  public sealed class AttributeUsageAttribute : Attribute
11  {
12  internal AttributeTargets m_attributeTarget = AttributeTargets.All;
13 
14  internal bool m_allowMultiple;
15 
16  internal bool m_inherited = true;
17 
18  internal static AttributeUsageAttribute Default = new AttributeUsageAttribute(AttributeTargets.All);
19 
22  [__DynamicallyInvokable]
24  {
25  [__DynamicallyInvokable]
26  get
27  {
28  return m_attributeTarget;
29  }
30  }
31 
35  [__DynamicallyInvokable]
36  public bool AllowMultiple
37  {
38  [__DynamicallyInvokable]
39  get
40  {
41  return m_allowMultiple;
42  }
43  [__DynamicallyInvokable]
44  set
45  {
46  m_allowMultiple = value;
47  }
48  }
49 
53  [__DynamicallyInvokable]
54  public bool Inherited
55  {
56  [__DynamicallyInvokable]
57  get
58  {
59  return m_inherited;
60  }
61  [__DynamicallyInvokable]
62  set
63  {
64  m_inherited = value;
65  }
66  }
67 
70  [__DynamicallyInvokable]
72  {
73  m_attributeTarget = validOn;
74  }
75 
76  internal AttributeUsageAttribute(AttributeTargets validOn, bool allowMultiple, bool inherited)
77  {
78  m_attributeTarget = validOn;
79  m_allowMultiple = allowMultiple;
80  m_inherited = inherited;
81  }
82  }
83 }
Represents the base class for custom attributes.
Definition: Attribute.cs:15
Definition: __Canon.cs:3
bool AllowMultiple
Gets or sets a Boolean value indicating whether more than one instance of the indicated attribute can...
AttributeTargets ValidOn
Gets a set of values identifying which program elements that the indicated attribute can be applied t...
bool Inherited
Gets or sets a T:System.Boolean value that determines whether the indicated attribute is inherited by...
AttributeTargets
Specifies the application elements on which it is valid to apply an attribute.
AttributeUsageAttribute(AttributeTargets validOn)
Initializes a new instance of the T:System.AttributeUsageAttribute class with the specified list of T...
Specifies that the class can be serialized.
Specifies the usage of another attribute class. This class cannot be inherited.