mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-23 01:26:34 +08:00
在Serein.Library添加了基础功能模块,暂时实现了键值对/数组数据的创建(可配合JSON库进行序列化)
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
using Serein.Library;
|
||||
using Serein.Library.Api;
|
||||
using Serein.Library.Utils;
|
||||
using Serein.Library.Utils.SereinExpression;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Serein.BaseNode
|
||||
{
|
||||
@@ -10,7 +15,7 @@ namespace Serein.BaseNode
|
||||
Get,
|
||||
Set
|
||||
}
|
||||
[DynamicFlow(Name ="基础节点")]
|
||||
[DynamicFlow(Name ="[基础节点]")]
|
||||
internal class SereinBaseNodes
|
||||
{
|
||||
[NodeAction(NodeType.Action,"条件节点")]
|
||||
@@ -48,5 +53,39 @@ namespace Serein.BaseNode
|
||||
}
|
||||
|
||||
|
||||
|
||||
[NodeAction(NodeType.Action, "KV数据收集节点")]
|
||||
private Dictionary<string, object> SereinKvDataCollectionNode(string argName, params object[] value)
|
||||
{
|
||||
var names = argName.Split(';');
|
||||
var count = Math.Min(value.Length, names.Length);
|
||||
var dict = new Dictionary<string, object>();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
dict[names[i]] = value[i];
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
[NodeAction(NodeType.Action, "List数据收集节点")]
|
||||
private object[] SereinListDataCollectionNode(params object[] value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
/* if (!DynamicObjectHelper.TryResolve(dict, className, out var result))
|
||||
{
|
||||
Console.WriteLine("赋值过程中有错误,请检查属性名和类型!");
|
||||
}
|
||||
else
|
||||
{
|
||||
DynamicObjectHelper.PrintObjectProperties(result);
|
||||
}
|
||||
//if (!ObjDynamicCreateHelper.TryResolve(externalData, "RootType", out var result))
|
||||
//{
|
||||
// Console.WriteLine("赋值过程中有错误,请检查属性名和类型!");
|
||||
|
||||
//}
|
||||
//ObjDynamicCreateHelper.PrintObjectProperties(result!);
|
||||
return result;*/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user