Exemple #1
0
        /// <summary>
        /// 比较
        /// </summary>
        /// <param name="site"></param>
        /// <returns></returns>
        public NamedRmsXyz Compare(NamedRmsXyz site)
        {
            NamedRmsXyz namedXyz = new NamedRmsXyz()
            {
                Name = site.Name,
                //  Value = this.Value.Value - site.Value.Value
            };

            return(namedXyz);
        }
Exemple #2
0
        /// <summary>
        /// 比较
        /// </summary>
        /// <param name="listA"></param>
        /// <param name="listB"></param>
        /// <returns></returns>
        public static List <NamedRmsXyz> Compare(List <NamedRmsXyz> listA, List <NamedRmsXyz> listB)
        {
            List <NamedRmsXyz> list = new List <NamedRmsXyz>();

            foreach (var item in listA)
            {
                NamedRmsXyz site = listB.Find(m => string.Equals(m.Name.Trim(), item.Name.Trim(), StringComparison.CurrentCultureIgnoreCase));
                if (site != null)
                {
                    list.Add(item.Compare(site));
                }
            }
            return(list);
        }