예제 #1
0
        /// <summary>
        ///     比较
        /// </summary>
        /// <param name="newList">新实体标识集合</param>
        /// <param name="oldList">旧实体标识集合</param>
        public static KeyListCompareResult <string> Compare(this IEnumerable <string> newList,
                                                            IEnumerable <string> oldList)
        {
            var comparator = new KeyListComparator <string>();

            return(comparator.Compare(newList, oldList));
        }
예제 #2
0
        /// <summary>
        /// 比较键
        /// </summary>
        /// <typeparam name="TKey">键类型</typeparam>
        /// <param name="newList">新实体标识集合</param>
        /// <param name="oldList">旧实体标识集合</param>
        private static KeyListCompareResult <TKey> CompareKey <TKey>(IEnumerable <TKey> newList, IEnumerable <TKey> oldList)
        {
            var comparator = new KeyListComparator <TKey>();

            return(comparator.Compare(newList, oldList));
        }
예제 #3
0
 /// <summary>
 ///     测试初始化
 /// </summary>
 public KeyListComparatorTest()
 {
     _comparator = new KeyListComparator <Guid>();
 }