using Serein.Library.Api;
using Serein.Library.Enums;
using System;
using System.Linq;
namespace Serein.Library.Entity
{
///
/// 每个节点有独自的MethodDetails实例
///
public class MethodDetails
{
///
/// 从DLL拖动出来时拷贝新的实例
///
///
public MethodDetails Clone()
{
return new MethodDetails
{
ActingInstance = ActingInstance,
ActingInstanceType = ActingInstanceType,
MethodDynamicType = MethodDynamicType,
MethodTips = MethodTips,
ReturnType = ReturnType,
MethodName = MethodName,
MethodLockName = MethodLockName,
IsProtectionParameter = IsProtectionParameter,
ExplicitDatas = ExplicitDatas?.Select(it => it.Clone()).ToArray(),
};
}
///
/// 是否保护参数(仅视觉效果参数,不影响运行实现)
///
public bool IsProtectionParameter { get; set; } = false;
///
/// 作用实例的类型(多个相同的节点将拥有相同的类型)
///
public Type ActingInstanceType { get; set; }
///
/// 作用实例(多个相同的节点将会共享同一个实例)
///
public object ActingInstance { get; set; }
///
/// 方法名称
///
public string MethodName { get; set; }
///
/// 节点类型
///
public NodeType MethodDynamicType { get; set; }
///
/// 锁名称(暂未实现)
///
public string MethodLockName { get; set; }
///
/// 方法说明
///
public string MethodTips { get; set; }
///
/// 参数内容
///
public ExplicitData[] ExplicitDatas { get; set; }
///
/// 出参类型
///
public Type ReturnType { get; set; }
}
}