从DLL导入方法将按照方法名称首字母开始排序;规范化方法参数描述中的输入类型,改为枚举。

This commit is contained in:
fengjiayi
2025-03-15 15:43:42 +08:00
parent d8f4a5a2c2
commit 1ae4c87aac
14 changed files with 165 additions and 57 deletions

View File

@@ -74,7 +74,7 @@ namespace Serein.Library
pd.DataType = null;
pd.Name = null;
pd.ArgDataSourceNodeGuid = null;
pd.ExplicitTypeName = null;
pd.InputType = ParameterValueInputType.Input;
}
this.MethodDetails.ParameterDetailss = null;
this.MethodDetails.ActingInstance = null;

View File

@@ -10,6 +10,8 @@ using System.Threading.Tasks;
namespace Serein.Library
{
/// <summary>
/// 节点入参参数详情
/// </summary>
@@ -57,7 +59,7 @@ namespace Serein.Library
/// <para>Value :除以上类型之外的任意参数</para>
/// </summary>
[PropertyInfo]
private string _explicitTypeName ;
private ParameterValueInputType _inputType ;
/// <summary>
/// 入参数据来源。默认使用上一节点作为入参数据。
@@ -91,7 +93,7 @@ namespace Serein.Library
private string _dataValue;
/// <summary>
/// 只有当ExplicitTypeName 为 Select 时,才会需要该成员。
/// 只有当 InputType 为 Select 时,才会需要该成员。
/// </summary>
[PropertyInfo(IsNotification = true)]
private string[] _items ;
@@ -104,6 +106,8 @@ namespace Serein.Library
}
public partial class ParameterDetails
{
@@ -133,7 +137,7 @@ namespace Serein.Library
Name = info.Name;
DataType = Type.GetType(info.DataTypeFullName);
ExplicitType = Type.GetType(info.ExplicitTypeFullName);
ExplicitTypeName = info.ExplicitTypeName;
InputType = info.InputType.ConvertEnum<ParameterValueInputType>();
Items = info.Items;
IsParams = info.IsParams;
}
@@ -151,7 +155,7 @@ namespace Serein.Library
DataTypeFullName = this.DataType.FullName,
Name = this.Name,
ExplicitTypeFullName = this.ExplicitType.FullName,
ExplicitTypeName = this.ExplicitTypeName,
InputType = this.InputType.ToString(),
Items = this.Items.Select(it => it).ToArray(),
};
}
@@ -168,7 +172,7 @@ namespace Serein.Library
Index = this.Index,
IsExplicitData = this.IsExplicitData,
ExplicitType = this.ExplicitType,
ExplicitTypeName = this.ExplicitTypeName,
InputType = this.InputType,
//Convertor = this.Convertor,
DataType = this.DataType,
Name = this.Name,
@@ -199,6 +203,11 @@ namespace Serein.Library
{
return context;
}
// 返回流程上下文
if (typeof(NodeModelBase).IsAssignableFrom(DataType))
{
return NodeModel;
}
// 显式设置的参数
if (IsExplicitData && !DataValue.StartsWith("@", StringComparison.OrdinalIgnoreCase))
{

View File

@@ -43,7 +43,7 @@ namespace Serein.Library
/// <para>Bool : 布尔类型</para>
/// <para>Value 除以上类型之外的任意参数</para>
/// </summary>
public string ExplicitTypeName { get; set; }
public string InputType { get; set; }
/// <summary>
/// 参数选择器