-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathNodeRegister.cs
More file actions
93 lines (78 loc) · 2.16 KB
/
NodeRegister.cs
File metadata and controls
93 lines (78 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Website: https://www.blazor.zone or https://argozhang.github.io/
namespace BootstrapBlazor.Components.Data.Interop;
/// <summary>
/// 节点插槽
/// </summary>
public class NodeSlotDto
{
/// <summary>
/// 插槽名称
/// </summary>
public string Name { get; set; } = string.Empty;
/// <summary>
/// 插槽类型 TypeName
/// </summary>
public string Type { get; set; } = string.Empty;
}
/// <summary>
/// 节点组件
/// </summary>
public class WidgetDto
{
/// <summary>
/// 组件ID,需要在当前节点下唯一
/// </summary>
public string WidgetId { get; set; } = string.Empty;
/// <summary>
/// 节点组件类型
/// </summary>
public string WidgetType { get; set; } = string.Empty;
/// <summary>
/// 节点组件名称
/// </summary>
public string DisplayName { get; set; } = string.Empty;
/// <summary>
/// 默认值
/// </summary>
public object? Value { get; set; }
/// <summary>
/// 节点组件配置
/// </summary>
public WidgetOptions? WidgetOptions { get; set; }
/// <summary>
/// 是否有回调函数
/// </summary>
public bool HasCallback { get; set; }
}
/// <summary>
/// 节点配置
/// </summary>
public class GraphNodeConfigDto
{
/// <summary>
/// 节点唯一类型路径,形如 groupA/groupB/NodeName
/// </summary>
public string TypePath { get; set; } = null!;
/// <summary>
/// 节点名称
/// </summary>
public string DisplayName { get; set; } = string.Empty;
/// <summary>
/// 输入插槽
/// </summary>
public List<NodeSlotDto> Inputs { get; set; } = new();
/// <summary>
/// 输出插槽
/// </summary>
public List<NodeSlotDto> Outputs { get; set; } = new();
/// <summary>
/// 节点组件
/// </summary>
public List<WidgetDto> Widgets { get; set; } = new();
/// <summary>
/// 是否有执行方法
/// </summary>
public bool HasAction { get; set; }
}