Output: Parameter attributes on constructors and methods

This commit is contained in:
Katy Coe
2019-11-04 17:46:32 +01:00
parent 9ceb1368e2
commit 6d3aca4087

View File

@@ -160,7 +160,7 @@ namespace Il2CppInspector.Reflection
// Get C# syntax-friendly list of parameters
// TODO: Parameter custom attributes
public string GetParametersString() =>
string.Join(", ", DeclaredParameters.Select(p => $"{p.GetModifierString()}{p.ParameterType.CSharpName} {p.Name}"));
string.Join(", ", DeclaredParameters.Select(p => $"{p.CustomAttributes.ToString(inline: true)}{p.GetModifierString()}{p.ParameterType.CSharpName} {p.Name}"));
public string GetTypeParametersString() => GenericTypeParameters == null? "" :
"<" + string.Join(", ", GenericTypeParameters.Select(p => p.CSharpName)) + ">";