Пример #1
0
        public TValue GetOrAddTest <TKey, TValue>(Dictionary <TKey, TValue> d, TKey key)
            where TValue : new()
        {
            TValue result = EnumerableExtension.GetOrAdd <TKey, TValue>(d, key);

            return(result);
            // TODO: add assertions to method EnumerableExtensionTest.GetOrAddTest(Dictionary`2<!!0,!!1>, !!0)
        }
Пример #2
0
        public TValue GetOrAddTest02 <TKey, TValue>(
            Dictionary <TKey, TValue> d,
            TKey key,
            Func <TValue> createDefaultValue
            )
        {
            TValue result = EnumerableExtension.GetOrAdd <TKey, TValue>(d, key, createDefaultValue);

            return(result);
            // TODO: add assertions to method EnumerableExtensionTest.GetOrAddTest02(Dictionary`2<!!0,!!1>, !!0, Func`1<!!1>)
        }
Пример #3
0
        public TValue GetOrAddTest01 <TKey, TValue>(
            Dictionary <TKey, TValue> d,
            TKey key,
            TValue defaultValue
            )
        {
            TValue result = EnumerableExtension.GetOrAdd <TKey, TValue>(d, key, defaultValue);

            return(result);
            // TODO: add assertions to method EnumerableExtensionTest.GetOrAddTest01(Dictionary`2<!!0,!!1>, !!0, !!1)
        }