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

◆ InternalIsDefined() [2/2]

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

Definition at line 43 of file Attribute.cs.

44 {
45 if (element.IsDefined(attributeType, inherit))
46 {
47 return true;
48 }
49 if (inherit)
50 {
51 AttributeUsageAttribute attributeUsageAttribute = InternalGetAttributeUsage(attributeType);
52 if (!attributeUsageAttribute.Inherited)
53 {
54 return false;
55 }
58 while (parentDefinition != null)
59 {
60 if (parentDefinition.IsDefined(attributeType, inherit: false))
61 {
62 return true;
63 }
65 }
66 }
67 return false;
68 }
static AttributeUsageAttribute InternalGetAttributeUsage(Type type)
Definition Attribute.cs:319
static PropertyInfo GetParentDefinition(PropertyInfo property, Type[] propertyParameters)
Definition Attribute.cs:71
static Type[] GetIndexParameterTypes(PropertyInfo element)
Definition Attribute.cs:283
bool IsDefined(Type attributeType, bool inherit)

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

Referenced by System.Attribute.IsDefined().