Exemple #1
0
        public static TValue GetValueOrDefault <TKey1, TKey2, TKey3, TKey4, TKey5, TKey6, TKey7, TValue>(this IDictionary <MemoryKey <TKey1, TKey2, TKey3, TKey4, TKey5, TKey6, TKey7>, TValue> dictionary, TKey1 tKey1, TKey2 tKey2, TKey3 tKey3, TKey4 tKey4, TKey5 tKey5, TKey6 tKey6, TKey7 tKey7, TValue defaultValue = default(TValue))
        {
            TValue value;

            return(dictionary.TryGetValue(MemoryKey.Create(tKey1, tKey2, tKey3, tKey4, tKey5, tKey6, tKey7), out value)
                ? value
                : defaultValue);
        }
Exemple #2
0
        public static TValue GetValueOrDefault <TKey1, TKey2, TValue>(this IDictionary <MemoryKey <TKey1, TKey2>, TValue> dictionary, TKey1 tKey1, TKey2 tKey2, TValue defaultValue = default(TValue))
        {
            TValue value;

            return(dictionary.TryGetValue(MemoryKey.Create(tKey1, tKey2), out value)
                ? value
                : defaultValue);
        }
Exemple #3
0
 public static IEnumerable <TValue> Get <TKey1, TKey2, TKey3, TKey4, TKey5, TKey6, TKey7, TValue>(this ILookup <MemoryKey <TKey1, TKey2, TKey3, TKey4, TKey5, TKey6, TKey7>, TValue> lookup, TKey1 tKey1, TKey2 tKey2, TKey3 tKey3, TKey4 tKey4, TKey5 tKey5, TKey6 tKey6, TKey7 tKey7)
 {
     return(lookup[MemoryKey.Create(tKey1, tKey2, tKey3, tKey4, tKey5, tKey6, tKey7)]);
 }
Exemple #4
0
 public static IEnumerable <TValue> Get <TKey1, TKey2, TKey3, TValue>(this ILookup <MemoryKey <TKey1, TKey2, TKey3>, TValue> lookup, TKey1 tKey1, TKey2 tKey2, TKey3 tKey3)
 {
     return(lookup[MemoryKey.Create(tKey1, tKey2, tKey3)]);
 }