duheng
2024-09-26 f04e6ed843d66c22e08132ca23d2193d6800905c
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
namespace Yw.EPAnet
{
    /// <summary>
    /// 计算结果
    /// </summary>
    public class CalcuResult
    {
        /// <summary>
        /// 
        /// </summary>
        public CalcuResult()
        {
            this.Succeed = true;
            this.FailedList = new List<CalcuFailed>();
            this.NodeList = new List<CalcuNode>();
            this.LinkList = new List<CalcuLink>();
        }
 
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Succeed { get; set; }
 
        /// <summary>
        /// 失败列表
        /// </summary>
        public List<CalcuFailed> FailedList { get; set; }
 
        /// <summary>
        /// 节点列表
        /// </summary>
        public List<CalcuNode> NodeList { get; set; }
 
        /// <summary>
        /// 管段列表
        /// </summary>
        public List<CalcuLink> LinkList { get; set; }
 
        /// <summary>
        /// 获取组件列表
        /// </summary>
        public List<CalcuParter> GetParterList()
        {
            var list = new List<CalcuParter>();
            if (this.NodeList != null && this.NodeList.Count > 0)
            {
                list.AddRange(this.NodeList);
            }
            if (this.LinkList != null && this.LinkList.Count > 0)
            {
                list.AddRange(this.LinkList);
            }
            return list;
        }
 
 
    }
}