Exemplo n.º 1
0
 private Comparison GetDictionaryValues <TKey>(SetComparer <TKey> .Comparison keysComparison, IDictionary <TKey, TValue> left, IDictionary <TKey, TValue> right)
 {
     return(new Comparison(keysComparison.Matches.Select(k => left[k]).ToList(),
                           keysComparison.OnlyOnLeft.Select(k => left[k]).ToList(),
                           keysComparison.OnlyOnRight.Select(k => right[k]).ToList()));
 }
Exemplo n.º 2
0
        public Comparison Compare <TKey>(IDictionary <TKey, TValue> left, IDictionary <TKey, TValue> right, IEqualityComparer <TKey> comparer = null)
        {
            var keysComparison = new SetComparer <TKey>().Compare(left.Keys, right.Keys);

            return(GetDictionaryValues(keysComparison, left, right));
        }