duheng
2025-01-22 d6111ca1fa9f70afc50c8213f81c9d78c14a6527
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroParterInfoExtensions.cs
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yw.Model;
using Yw.Model;
namespace Yw.WinFrmUI
{
@@ -21,6 +16,13 @@
            {
                return default;
            }
            allSourceList.ForEach(x =>
            {
                if (x.Flags == null)
                {
                    x.Flags = new List<string>();
                }
            });
            var sourceList = allSourceList.OrderBy(x => x.Flags.Distinct().Count()).ToList();
            return sourceList.Find(x => x.Flags.ContainsC(flags));
        }
@@ -34,6 +36,13 @@
            {
                return default;
            }
            allNodeList.ForEach(x =>
            {
                if (x.Flags == null)
                {
                    x.Flags = new List<string>();
                }
            });
            var nodeList = allNodeList.OrderBy(x => x.Flags.Distinct().Count()).ToList();
            return nodeList.Find(x => x.Flags.ContainsC(flags));
        }
@@ -47,6 +56,13 @@
            {
                return default;
            }
            allLinkList.ForEach(x =>
            {
                if (x.Flags == null)
                {
                    x.Flags = new List<string>();
                }
            });
            var linkList = allLinkList.OrderBy(x => x.Flags.Distinct().Count()).ToList();
            return linkList.Find(x => x.Flags.ContainsC(flags));
        }