using AuroraDesk.Core.Entities;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace AuroraDesk.Core.Interfaces;
///
/// 节点画布服务接口
///
public interface INodeCanvasService
{
///
/// 节点集合
///
ObservableCollection Nodes { get; }
///
/// 连接集合
///
ObservableCollection Connections { get; }
///
/// 添加节点到画布
///
void AddNode(Node node);
///
/// 移除节点(同时移除相关连接)
///
void RemoveNode(Node node);
///
/// 更新节点位置
///
void UpdateNodePosition(Node node, double x, double y);
///
/// 创建连接
///
bool CreateConnection(ConnectionPoint sourcePoint, ConnectionPoint targetPoint);
///
/// 移除连接
///
void RemoveConnection(Connection connection);
///
/// 获取节点的所有连接
///
IEnumerable GetNodeConnections(Node node);
///
/// 清除所有节点和连接
///
void Clear();
}