mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 07:44:09 +02:00
Added ToString
This commit is contained in:
parent
e3d48c6842
commit
f566daacea
1 changed files with 21 additions and 1 deletions
|
@ -23,7 +23,7 @@ namespace System.Reflection
|
|||
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 ReturnType => Type.[Friend]GetType(mMethodData.mReturnType);
|
||||
|
||||
public Type GetParamType(int paramIdx)
|
||||
{
|
||||
|
@ -631,6 +631,26 @@ namespace System.Reflection
|
|||
return retVal;
|
||||
}
|
||||
|
||||
public override void ToString(String strBuffer)
|
||||
{
|
||||
let retType = Type.[Friend]GetType(mMethodData.mReturnType);
|
||||
retType.ToString(strBuffer);
|
||||
strBuffer.Append(' ');
|
||||
strBuffer.Append(mMethodData.mName);
|
||||
strBuffer.Append('(');
|
||||
for (int paramIdx < mMethodData.mParamCount)
|
||||
{
|
||||
if (paramIdx > 0)
|
||||
strBuffer.Append(", ");
|
||||
let paramData = mMethodData.mParamData[paramIdx];
|
||||
let paramType = Type.[Friend]GetType(paramData.mType);
|
||||
paramType.ToString(strBuffer);
|
||||
strBuffer.Append(' ');
|
||||
strBuffer.Append(paramData.mName);
|
||||
}
|
||||
strBuffer.Append(')');
|
||||
}
|
||||
|
||||
public struct Enumerator : IEnumerator<MethodInfo>
|
||||
{
|
||||
BindingFlags mBindingFlags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue