mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 07:44:09 +02:00
Reflection support for method param attributes, return attributes
This commit is contained in:
parent
19513d3310
commit
c10565678e
4 changed files with 38 additions and 14 deletions
|
@ -37,11 +37,22 @@ namespace System.Reflection
|
|||
return mMethodData.mParamData[paramIdx].mName;
|
||||
}
|
||||
|
||||
public Result<T> GetParamCustomAttribute<T>(int paramIdx) where T : Attribute
|
||||
{
|
||||
Debug.Assert((uint)paramIdx < (uint)mMethodData.mParamCount);
|
||||
return mTypeInstance.[Friend]GetCustomAttribute<T>(mMethodData.mParamData[paramIdx].mCustomAttributesIdx);
|
||||
}
|
||||
|
||||
public Result<T> GetCustomAttribute<T>() where T : Attribute
|
||||
{
|
||||
return mTypeInstance.[Friend]GetCustomAttribute<T>(mMethodData.mCustomAttributesIdx);
|
||||
}
|
||||
|
||||
public Result<T> GetReturnCustomAttribute<T>() where T : Attribute
|
||||
{
|
||||
return mTypeInstance.[Friend]GetCustomAttribute<T>(mMethodData.mReturnCustomAttributesIdx);
|
||||
}
|
||||
|
||||
public enum CallError
|
||||
{
|
||||
case None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue