private static Variance typedHomogeneousKeyValueEnumerableCompare <T, TSubTypeKey, TSubTypeValue>(T val1, T val2, string fieldName) { var set1 = ((IEnumerable <KeyValuePair <TSubTypeKey, TSubTypeValue> >)val1).ToDictionary(a => a.Key, a => a.Value); var set2 = ((IEnumerable <KeyValuePair <TSubTypeKey, TSubTypeValue> >)val2).ToDictionary(a => a.Key, a => a.Value); return(TExtensions.DictionaryCompare <TSubTypeKey, TSubTypeValue>(set1, set2, fieldName)); }
private static Variance subTypedKeyedTypedHomogeneousObjectEnumerableCompareWithKeyFunc <T, TSubType, TSubTypeKey>(T val1, T val2, string fieldName, Func <TSubType, TSubTypeKey> getKey) { var set1 = ((IEnumerable <TSubType>)val1).ToDictionary(a => getKey(a)); var set2 = ((IEnumerable <TSubType>)val2).ToDictionary(a => getKey(a)); return(TExtensions.DictionaryCompare <TSubTypeKey, TSubType>(set1, set2, fieldName)); }