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

Added ReturnType

This commit is contained in:
Brian Fiete 2020-06-18 04:29:31 -07:00
parent 44a4702ab4
commit f6e31e4976

View file

@ -12,54 +12,19 @@ namespace System.Reflection
TypeInstance mTypeInstance;
TypeInstance.MethodData* mMethodData;
public bool IsInitialized
{
get
{
return mMethodData != null;
}
}
public StringView Name
{
get
{
return mMethodData.[Friend]mName;
}
}
public int ParamCount
{
get
{
return mMethodData.[Friend]mParamCount;
}
}
public bool IsConstructor
{
get
{
// String pooling allows us to do identity comparison
return (Object)mMethodData.mName == "__BfCtor" || ((Object)mMethodData.mName == "__BfStaticCtor");
}
}
public bool IsDestructor
{
get
{
// String pooling allows us to do identity comparison
return (Object)mMethodData.mName == "__BfStaticDtor" || (Object)mMethodData.mName == "__BfStaticDtor";
}
}
public this(TypeInstance typeInstance, TypeInstance.MethodData* methodData)
{
mTypeInstance = typeInstance;
mMethodData = methodData;
}
public bool IsInitialized => mMethodData != null;
public StringView Name => mMethodData.[Friend]mName;
public int ParamCount => mMethodData.[Friend]mParamCount;
public bool IsConstructor => mMethodData.mName === "__BfCtor" || mMethodData.mName === "__BfStaticCtor";
public bool IsDestructor => mMethodData.mName === "__BfStaticDtor" || mMethodData.mName === "__BfStaticDtor";
public Type ReturnType => GetType(mMethodData.mReturnType);
public Type GetParamType(int paramIdx)
{
Debug.Assert((uint)paramIdx < (uint)mMethodData.mParamCount);