mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-19 16:06:33 +08:00
新增了UI节点
This commit is contained in:
41
Library/Api/IEmbeddedContent.cs
Normal file
41
Library/Api/IEmbeddedContent.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Serein.Library.Api
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 流程中的控件
|
||||
/// </summary>
|
||||
public interface IFlowControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 节点执行事件
|
||||
/// </summary>
|
||||
void OnExecuting(object data);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义UI显示
|
||||
/// </summary>
|
||||
public interface IEmbeddedContent
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取用户控件(WPF)
|
||||
/// </summary>
|
||||
object GetUserControl();
|
||||
|
||||
/// <summary>
|
||||
/// 获取窗体控件
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IFlowControl GetFlowControl();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,6 +29,12 @@ namespace Serein.Library
|
||||
/// </summary>
|
||||
Exit,
|
||||
|
||||
/// <summary>
|
||||
/// <para>UI节点(每个节点只会执行一次对应的方法)</para>
|
||||
/// <para>需要返回IEmbeddedContent接口</para>
|
||||
/// <para>IEmbeddedContent接口实现由你决定</para>
|
||||
/// </summary>
|
||||
UI,
|
||||
|
||||
/// <summary>
|
||||
/// <para>触发器节点,必须为标记在可异步等待的方法,建议与继承了 FlowTriggerk<TEnum> 的实例对象搭配使用</para>
|
||||
@@ -88,6 +94,11 @@ namespace Serein.Library
|
||||
/// </summary>
|
||||
Flipflop,
|
||||
|
||||
/// <summary>
|
||||
/// UI节点
|
||||
/// </summary>
|
||||
UI,
|
||||
|
||||
/// <summary>
|
||||
/// 表达式操作节点
|
||||
/// </summary>
|
||||
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Serein.Library.Utils.EmitHelper;
|
||||
@@ -27,7 +28,7 @@ namespace Serein.Library
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*/// <summary>
|
||||
/// 更新委托方法
|
||||
/// </summary>
|
||||
|
||||
@@ -379,8 +379,12 @@ namespace Serein.Library
|
||||
if (md.ActingInstance is null)
|
||||
{
|
||||
md.ActingInstance = context.Env.IOC.Get(md.ActingInstanceType);
|
||||
if (md.ActingInstance is null)
|
||||
{
|
||||
md.ActingInstance = context.Env.IOC.Instantiate(md.ActingInstanceType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
object[] args = await GetParametersAsync(context);
|
||||
var result = await dd.InvokeAsync(md.ActingInstance, args);
|
||||
return result;
|
||||
|
||||
@@ -9,8 +9,6 @@ namespace Serein.Library.Utils
|
||||
public class ArrayHelper
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数组尾部扩容
|
||||
/// </summary>
|
||||
|
||||
@@ -8,6 +8,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Serein.Library.Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// 通过字典构造动态对象
|
||||
/// </summary>
|
||||
public class DynamicObjectHelper
|
||||
{
|
||||
// 类型缓存,键为类型的唯一名称(可以根据实际需求调整生成方式)
|
||||
|
||||
@@ -16,7 +16,6 @@ namespace Serein.Library.Utils
|
||||
public static class ObjectConvertHelper
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 父类转为子类
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user