Output: Move getParametersString into MethodBase/ParameterInfo

This commit is contained in:
Katy Coe
2019-10-31 23:23:52 +01:00
parent 3560661f9c
commit dbc3ef40b0
3 changed files with 11 additions and 20 deletions

View File

@@ -6,6 +6,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
@@ -137,6 +138,10 @@ namespace Il2CppInspector.Reflection
return modifiers.ToString();
}
// Get C# syntax-friendly list of parameters
public string GetParametersString() =>
string.Join(", ", DeclaredParameters.Select(p => $"{p.GetModifierString()}{p.ParameterType.CSharpName} {p.Name}"));
// List of operator overload metadata names
// https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/operator-overloads
public static Dictionary<string, string> OperatorMethodNames = new Dictionary<string, string> {