Model: MemberInfo.GetCustomAttributes() now returns CustomAttributeData[]

This commit is contained in:
Katy Coe
2019-11-09 20:24:43 +01:00
parent 21d486eb92
commit 68dc57f541

View File

@@ -17,7 +17,7 @@ namespace Il2CppInspector.Reflection {
// Custom attributes for this member
public abstract IEnumerable<CustomAttributeData> CustomAttributes { get; }
public TypeInfo[] GetCustomAttributes(string fullTypeName) => CustomAttributes.Where(a => a.AttributeType.FullName == fullTypeName).Select(x => x.AttributeType).ToArray();
public CustomAttributeData[] GetCustomAttributes(string fullTypeName) => CustomAttributes.Where(a => a.AttributeType.FullName == fullTypeName).ToArray();
// Type that this type is declared in for nested types
protected int declaringTypeDefinitionIndex { private get; set; } = -1;