duheng
2024-11-05 21dd2ae9704c484d5d75b2ed980e5402505da7dc
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
namespace Yw.EPAnet
{
    /// <summary>
    /// 计算结果
    /// </summary>
    public class CalcuResult:IDisposable
    {
        /// <summary>
        /// 
        /// </summary>
        public CalcuResult()
        {
            this.Succeed = true;
            this.FailedList = new List<CalcuFailed>();
            this.NodeList = new List<ICalcuNode>();
            this.LinkList = new List<ICalcuLink>();
            this.NodeDict = new Dictionary<string, ICalcuNode>();
            this.LinkDict = new Dictionary<string, ICalcuLink>();
        }
 
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Succeed { get; set; }
 
        /// <summary>
        /// 失败列表
        /// </summary>
        public List<CalcuFailed> FailedList { get; set; }
 
        /// <summary>
        /// 节点列表
        /// </summary>
        public List<ICalcuNode> NodeList { get; set; }
 
        /// <summary>
        /// 管段列表
        /// </summary>
        public List<ICalcuLink> LinkList { get; set; }
 
        /// <summary>
        /// 节点字典
        /// </summary>
        public Dictionary<string,ICalcuNode> NodeDict { get; set; }
 
        /// <summary>
        /// 管段字典
        /// </summary>
        public Dictionary<string,ICalcuLink> LinkDict { get; set; }
 
        public void Dispose()
        {
            
        }
 
 
        /// <summary>
        /// 获取组件列表
        /// </summary>
        public List<ICalcuParter> GetParterList()
        {
            var list = new List<ICalcuParter>();
            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;
        }
 
 
    }
}