diff --git a/Library/Extension/FlowModelExtension.cs b/Library/Extension/FlowModelExtension.cs
index 6467e5d..d71b314 100644
--- a/Library/Extension/FlowModelExtension.cs
+++ b/Library/Extension/FlowModelExtension.cs
@@ -342,7 +342,7 @@ namespace Serein.Library
args[i] = mainArgTasks[i].Result;
}
- // 并发处理 params 参数
+ // 并发处理 params 类型的入参参数
if (paramsArgs != null)
{
int paramsLength = paramsArgs.Length;
diff --git a/Library/FlowNode/DelegateDetails.cs b/Library/FlowNode/DelegateDetails.cs
index 0b9841f..65e1dbb 100644
--- a/Library/FlowNode/DelegateDetails.cs
+++ b/Library/FlowNode/DelegateDetails.cs
@@ -11,41 +11,81 @@ using static Serein.Library.Utils.EmitHelper;
namespace Serein.Library
{
///
- /// Emit创建的委托描述,用于WebApi、WebSocket、NodeFlow动态调用方法的场景。
+ /// 通过 Emit 创建委托,代替反射调用方法,实现高性能的动态调用。
/// 一般情况下你无须内部细节,只需要调用 Invoke() 方法即可。
///
public class DelegateDetails
{
+ private readonly EmitType emitType = EmitType.None;
+
+ ///
+ /// 创建的委托类型
+ ///
+ public enum EmitType
+ {
+ ///
+ /// 默认
+ ///
+ None,
+ ///
+ /// 方法调用
+ ///
+ MethodInvoke,
+ ///
+ /// 字段赋值
+ ///
+ FieldSetter,
+ ///
+ /// 字段取值
+ ///
+ FieldGetter,
+ ///
+ /// 属性赋值
+ ///
+ PropertySetter,
+ ///
+ /// 属性取值
+ ///
+ PropertyGetter,
+ ///
+ /// 集合取值
+ ///
+ CollectionGetter,
+ ///
+ /// 集合赋值
+ ///
+ CollectionSetter
+ }
+
+ public enum GSType
+ {
+ Get,
+ Set,
+ }
+
+
///
/// 根据方法信息构建Emit委托
///
///
public DelegateDetails(MethodInfo methodInfo)
{
+ emitType = EmitType.MethodInvoke;
var emitMethodType = EmitHelper.CreateDynamicMethod(methodInfo, out var emitDelegate);
_emitMethodInfo = emitMethodType;
_emitDelegate = emitDelegate;
-
- SetFunc();
- }
-
-
- private void SetFunc()
- {
+ methodType = _emitMethodInfo.EmitMethodType;
if (_emitDelegate is Func