コード例 #1
0
        public static IDistinctValuedDictionary <TKey, TValue> ToDistinctValued <TKey, TValue>(this IDictionary <TKey, TValue> dictionary, IEqualityComparer <TValue> valueEqualityComparer)
        {
            // Verify that the values are distinct (exception will be thrown if not).
            dictionary.Values.VerifyDistinct(valueEqualityComparer);

            // Input passes, so just wrap it.
            return(dictionary.Wrap());
        }
コード例 #2
0
 public static IDistinctValuedDictionary <TKey, TValue> AsDistinctValued <TKey, TValue>(this IDictionary <TKey, TValue> dictionary)
 {
     return(dictionary.Wrap());
 }