Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InternalIsDefined() [1/2]

static bool System.Attribute.InternalIsDefined ( EventInfo element,
Type attributeType,
bool inherit )
inlinestaticprivateinherited

Definition at line 129 of file Attribute.cs.

130 {
131 if (element.IsDefined(attributeType, inherit))
132 {
133 return true;
134 }
135 if (inherit)
136 {
137 AttributeUsageAttribute attributeUsageAttribute = InternalGetAttributeUsage(attributeType);
138 if (!attributeUsageAttribute.Inherited)
139 {
140 return false;
141 }
143 while (parentDefinition != null)
144 {
145 if (parentDefinition.IsDefined(attributeType, inherit: false))
146 {
147 return true;
148 }
150 }
151 }
152 return false;
153 }
static AttributeUsageAttribute InternalGetAttributeUsage(Type type)
Definition Attribute.cs:319
static PropertyInfo GetParentDefinition(PropertyInfo property, Type[] propertyParameters)
Definition Attribute.cs:71
bool IsDefined(Type attributeType, bool inherit)

References System.Attribute.GetParentDefinition(), System.Attribute.InternalGetAttributeUsage(), and System.Reflection.MemberInfo.IsDefined().