Model: Handle "in" and "ref" parameters

This commit is contained in:
Katy Coe
2019-11-07 02:26:03 +01:00
parent 7eec81314e
commit 7ab0c347f2

View File

@@ -28,6 +28,8 @@ namespace Il2CppInspector.Reflection
// Default value for the parameter
public object DefaultValue { get; }
public bool IsByRef => paramTypeUsage == ParameterType.Definition.byrefTypeIndex;
public bool IsIn => (Attributes & ParameterAttributes.In) != 0;
public bool IsOptional => (Attributes & ParameterAttributes.Optional) != 0;
public bool IsOut => (Attributes & ParameterAttributes.Out) != 0;
@@ -86,6 +88,8 @@ namespace Il2CppInspector.Reflection
}
public string GetModifierString() =>
(IsOut? "out " : "");
(IsIn ? "in " : "")
+ (IsByRef? "ref " : "")
+ (IsOut? "out " : "");
}
}
}