public static GeneralComparer <T> CreateGeneralComparer <T>(this T obj, Func <T, T, int> keySelector) { return(GeneralComparer.On <T>(keySelector)); }
/// <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)); }
/// <summary> /// 提供通用相等比较方法 /// </summary> public static GeneralComparer <dynamic> On(Func <dynamic, dynamic, int> keySelector) { return(GeneralComparer <dynamic> .On(keySelector)); }
/// <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)); }