C#: Replace "in, out" with "[In, Out]" (CS8328)
This commit is contained in:
@@ -112,8 +112,9 @@ namespace Il2CppInspector.Reflection
|
|||||||
|
|
||||||
// ref will be handled as part of the type name
|
// ref will be handled as part of the type name
|
||||||
public string GetModifierString() =>
|
public string GetModifierString() =>
|
||||||
(IsIn ? "in " : "")
|
(IsIn && !IsOut ? "in " : "")
|
||||||
+ (IsOut ? "out " : "")
|
+ (IsOut && !IsIn ? "out " : "")
|
||||||
|
+ (IsIn && IsOut ? "[In, Out] " : "")
|
||||||
+ (!IsIn && !IsOut && ParameterType.IsByRef ? "ref " : "");
|
+ (!IsIn && !IsOut && ParameterType.IsByRef ? "ref " : "");
|
||||||
|
|
||||||
private string getCSharpSignatureString(Scope scope) => $"{GetModifierString()}{ParameterType.GetScopedCSharpName(scope, omitRef: true)}";
|
private string getCSharpSignatureString(Scope scope) => $"{GetModifierString()}{ParameterType.GetScopedCSharpName(scope, omitRef: true)}";
|
||||||
|
|||||||
Reference in New Issue
Block a user