1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-12 05:14:10 +02:00

Add GetCustomAttributes

This commit is contained in:
disarray2077 2022-02-26 13:43:56 -03:00
parent 3dd4212ccd
commit 9eecf83c22
4 changed files with 329 additions and 0 deletions

View file

@ -239,6 +239,20 @@ namespace System.Reflection
return mTypeInstance.[Friend]GetCustomAttribute<T>(mFieldData.mCustomAttributesIdx);
}
public AttributeInfo.CustomAttributeEnumerator GetCustomAttributes()
{
if (Compiler.IsComptime)
Runtime.NotImplemented();
return mTypeInstance.[Friend]GetCustomAttributes(mFieldData.mCustomAttributesIdx);
}
public AttributeInfo.CustomAttributeEnumerator<T> GetCustomAttributes<T>() where T : Attribute
{
if (Compiler.IsComptime)
Runtime.NotImplemented();
return mTypeInstance.[Friend]GetCustomAttributes<T>(mFieldData.mCustomAttributesIdx);
}
void* GetDataPtrAndType(Object value, out Type type)
{
type = value.[Friend]RawGetType();