База нового метода вызова методов
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
get { return (ulong)OwnerId << 32 | (uint)ContextId; }
|
||||
get => (ulong)OwnerId << 32 | (uint)ContextId;
|
||||
set
|
||||
{
|
||||
OwnerId = (int)(value >> 32);
|
||||
|
||||
Reference in New Issue
Block a user