using Serein.Library;
using Serein.Workbench.Node.View;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Serein.Workbench.Api
{
///
/// 流程画布
///
public interface IFlowCanvas
{
///
/// 画布标识
///
string Guid { get; }
///
/// 画布名称
///
string Name { get; }
///
/// 数据
///
FlowCanvasDetails Model { get; }
///
/// 移除节点
///
void Remove(NodeControlBase nodeControl);
///
/// 添加节点
///
void Add(NodeControlBase nodeControl);
///
/// 创建节点之间方法调用关系
///
/// 调用顺序中的起始节点
/// 下一节点
/// 调用类型
void CreateInvokeConnection(NodeControlBase fromNodeControl, NodeControlBase toNodeControl, ConnectionInvokeType type);
///
/// 移除节点之间的调用关系
///
/// 调用顺序中的起始节点
/// 下一节点
void RemoveInvokeConnection(NodeControlBase fromNodeControl, NodeControlBase toNodeControl);
///
/// 创建节点之间的参数传递关系
///
/// 参数来源节点
/// 获取参数的节点
/// 指示参数是如何获取的
/// 作用在节点的第几个入参
void CreateArgConnection(NodeControlBase fromNodeControl, NodeControlBase toNodeControl, ConnectionArgSourceType type, int index);
///
/// 移除节点之间的参数传递关系
///
/// 参数来源节点
/// 获取参数的节点
/// 移除节点第几个入参
void RemoveArgConnection(NodeControlBase fromNodeControl, NodeControlBase toNodeControl, int index);
}
}