Model: Move parameter string generation to ParameterInfo

This commit is contained in:
Katy Coe
2019-11-07 02:31:47 +01:00
parent 7ab0c347f2
commit 4602497166
2 changed files with 9 additions and 4 deletions

View File

@@ -91,5 +91,13 @@ namespace Il2CppInspector.Reflection
(IsIn ? "in " : "")
+ (IsByRef? "ref " : "")
+ (IsOut? "out " : "");
public string GetParameterString() => IsRetval? null :
$"{CustomAttributes.ToString(inline: true).Replace("[ParamArray]", "params")}"
+ $"{GetModifierString()}{ParameterType.CSharpName} {Name}"
+ (HasDefaultValue ? " = " + DefaultValue.ToCSharpValue() : "");
public string GetReturnParameterString() => !IsRetval? null :
$"{GetModifierString()}{ParameterType.CSharpName}";
}
}