/// <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)); }
/// <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)); }
/// <summary> /// 测试初始化 /// </summary> public KeyListComparatorTest() { _comparator = new KeyListComparator <Guid>(); }