예제 #1
0
 public static GeneralComparer <T> CreateGeneralComparer <T>(this T obj, Func <T, T, int> keySelector)
 {
     return(GeneralComparer.On <T>(keySelector));
 }
예제 #2
0
 /// <summary>
 /// 提供通用相等比较方法
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="source"></param>
 /// <param name="keySelector"></param>
 /// <returns></returns>
 public static GeneralComparer <T> OnIEnumerable <T>(IEnumerable <T> source, Func <T, T, int> keySelector)
 {
     return(GeneralComparer <T> .On(keySelector));
 }
예제 #3
0
 /// <summary>
 /// 提供通用相等比较方法
 /// </summary>
 public static GeneralComparer <dynamic> On(Func <dynamic, dynamic, int> keySelector)
 {
     return(GeneralComparer <dynamic> .On(keySelector));
 }
예제 #4
0
 /// <summary>
 /// 提供通用相等比较方法
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="obj"></param>
 /// <param name="keySelector"></param>
 /// <returns></returns>
 public static GeneralComparer <T> On <T>(T obj, Func <T, T, int> keySelector)
 {
     return(GeneralComparer <T> .On(keySelector));
 }