C#: Replace "in, out" with "[In, Out]" (CS8328)

This commit is contained in:
Katy Coe
2020-02-24 12:28:38 +01:00
parent 168c955558
commit 027dde8358

View File

@@ -112,8 +112,9 @@ namespace Il2CppInspector.Reflection
// ref will be handled as part of the type name
public string GetModifierString() =>
(IsIn ? "in " : "")
+ (IsOut ? "out " : "")
(IsIn && !IsOut ? "in " : "")
+ (IsOut && !IsIn ? "out " : "")
+ (IsIn && IsOut ? "[In, Out] " : "")
+ (!IsIn && !IsOut && ParameterType.IsByRef ? "ref " : "");
private string getCSharpSignatureString(Scope scope) => $"{GetModifierString()}{ParameterType.GetScopedCSharpName(scope, omitRef: true)}";