mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-06 17:50:48 +08:00
重写了节点的view、viewmodel关系,实现了对画布元素的选取功能,重构了底层依赖,添加了对net .Framework4.6.1以上的Framework类库支持
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Serein.Library.Api;
|
||||
using Serein.Library.Core.NodeFlow;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using Serein.NodeFlow;
|
||||
|
||||
namespace Serein.NodeFlow.Tool
|
||||
{
|
||||
@@ -325,12 +326,22 @@ namespace Serein.NodeFlow.Tool
|
||||
convertedArgs
|
||||
);
|
||||
|
||||
// 创建 lambda 表达式
|
||||
var lambda = Expression.Lambda<Func<object, object[], Task<FlipflopContext>>>(
|
||||
Expression.Convert(methodCall, typeof(Task<FlipflopContext>)),
|
||||
instanceParam,
|
||||
argsParam
|
||||
);
|
||||
// 创建 lambda 表达式
|
||||
var lambda = Expression.Lambda<Func<object, object[], Task<IFlipflopContext>>>(
|
||||
Expression.Convert(methodCall, typeof(Task<IFlipflopContext>)),
|
||||
instanceParam,
|
||||
argsParam
|
||||
);
|
||||
//获取返回类型
|
||||
//var returnType = methodInfo.ReturnType;
|
||||
//var lambda = Expression.Lambda(
|
||||
// typeof(Func<,,>).MakeGenericType(typeof(object), typeof(object[]), returnType),
|
||||
// Expression.Convert(methodCall, returnType),
|
||||
// instanceParam,
|
||||
// argsParam
|
||||
// );
|
||||
|
||||
|
||||
//var resule = task.DynamicInvoke((object)[Activator.CreateInstance(type), [new DynamicContext(null)]]);
|
||||
return lambda.Compile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user