Files
serein-flow/Library/Entity/ExplicitData.cs
2024-09-25 22:20:23 +08:00

69 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Serein.Library.Entity
{
/// <summary>
/// 参数
/// </summary>
public class ExplicitData
{
/// <summary>
/// 索引
/// </summary>
public int Index { get; set; }
/// <summary>
/// 是否为显式参数(固定值/表达式)
/// </summary>
public bool IsExplicitData { get; set; }
/// <summary>
/// 是否为值转换器
/// </summary>
public bool IsEnumConvertor { get; set; }
///// <summary>
///// 显式类型
///// </summary>
//public Type ExplicitType { get; set; }
///// <summary>
///// 显示类型编号>
///// </summary>
public string ExplicitTypeName { get; set; }
/// <summary>
/// 方法需要的类型
/// </summary>
public Type DataType { get; set; }
/// <summary>
/// 方法入参参数名称
/// </summary>
public string ParameterName { get; set; }
/// <summary>
/// 入参值在UI上输入的文本内容
/// </summary>
public string DataValue { get; set; }
public object[] Items { get; set; }
public ExplicitData Clone() => new ExplicitData()
{
Index = Index,
IsExplicitData = IsExplicitData,
// ExplicitType = ExplicitType,
ExplicitTypeName = ExplicitTypeName,
DataType = DataType,
ParameterName = ParameterName,
DataValue = string.IsNullOrEmpty(DataValue) ? string.Empty : DataValue,
Items = Items.Select(it => it).ToArray(),
};
}
}