public static Func <PKM, string> GetCloneDetectMethod(CloneDetectionMethod Clones) { switch (Clones) { default: return(null); case CloneDetectionMethod.HashDetails: return(HashByDetails); case CloneDetectionMethod.HashPID: return(HashByPID); } }
public static IEnumerable <PKM> GetClones(IEnumerable <PKM> res, CloneDetectionMethod type = CloneDetectionMethod.HashDetails) { var method = GetCloneDetectMethod(type); return(method == null ? res : GetClones(res, method)); }