База нового метода вызова методов

This commit is contained in:
2025-03-03 07:53:14 +03:00
parent 853dcf9af6
commit 2b48c3e319
3 changed files with 33 additions and 1 deletions
+13
View File
@@ -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);
}
}
+19
View File
@@ -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<object?, object, object?[], object[]> Invoking { get; set; }
public object? Invoke(object instance, object?[] parameters, object[] special)
{
return Invoking(instance, parameters, special);
}
}
}
@@ -20,7 +20,7 @@ namespace mROA.Implementation
public ulong Flat public ulong Flat
{ {
get { return (ulong)OwnerId << 32 | (uint)ContextId; } get => (ulong)OwnerId << 32 | (uint)ContextId;
set set
{ {
OwnerId = (int)(value >> 32); OwnerId = (int)(value >> 32);