diff --git a/mROA/Abstract/IMethodInvoker.cs b/mROA/Abstract/IMethodInvoker.cs new file mode 100644 index 0000000..35ec3b1 --- /dev/null +++ b/mROA/Abstract/IMethodInvoker.cs @@ -0,0 +1,13 @@ +using System; + +namespace mROA.Abstract +{ + public interface IMethodInvoker + { + bool IsAsync { get; } + bool IsVoid { get; } + Type[] ParameterTypes { get; } + Type? ReturnType { get; } + object? Invoke(object instance, object?[] parameters, object[] special); + } +} \ No newline at end of file diff --git a/mROA/Implementation/MethodInvoker.cs b/mROA/Implementation/MethodInvoker.cs new file mode 100644 index 0000000..b49593f --- /dev/null +++ b/mROA/Implementation/MethodInvoker.cs @@ -0,0 +1,19 @@ +using System; +using mROA.Abstract; + +namespace mROA.Implementation +{ + public class MethodInvoker : IMethodInvoker + { + public bool IsAsync { get; set; } + public bool IsVoid { get; set; } + public Type[] ParameterTypes { get; set; } = Type.EmptyTypes; + public Type? ReturnType { get; set; } + public Func Invoking { get; set; } + + public object? Invoke(object instance, object?[] parameters, object[] special) + { + return Invoking(instance, parameters, special); + } + } +} \ No newline at end of file diff --git a/mROA/Implementation/UniversalObjectIdentifier.cs b/mROA/Implementation/UniversalObjectIdentifier.cs index 0348c0f..781567e 100644 --- a/mROA/Implementation/UniversalObjectIdentifier.cs +++ b/mROA/Implementation/UniversalObjectIdentifier.cs @@ -20,7 +20,7 @@ namespace mROA.Implementation public ulong Flat { - get { return (ulong)OwnerId << 32 | (uint)ContextId; } + get => (ulong)OwnerId << 32 | (uint)ContextId; set { OwnerId = (int)(value >> 32);