Model and Output: Implement default method parameter values
This commit is contained in:
@@ -160,7 +160,8 @@ namespace Il2CppInspector.Reflection
|
||||
// Get C# syntax-friendly list of parameters
|
||||
public string GetParametersString() =>
|
||||
string.Join(", ", DeclaredParameters.Select(p => $"{p.CustomAttributes.ToString(inline: true).Replace("[ParamArray]", "params")}"
|
||||
+ $"{p.GetModifierString()}{p.ParameterType.CSharpName} {p.Name}"));
|
||||
+ $"{p.GetModifierString()}{p.ParameterType.CSharpName} {p.Name}"
|
||||
+ (p.HasDefaultValue? " = " + p.DefaultValue.ToCSharpValue() : "")));
|
||||
|
||||
public string GetTypeParametersString() => GenericTypeParameters == null? "" :
|
||||
"<" + string.Join(", ", GenericTypeParameters.Select(p => p.CSharpName)) + ">";
|
||||
|
||||
Reference in New Issue
Block a user