示例#1
0
        public static bool Create <TKey, TValue>(GrowOnlyHashTable <TKey, GrowOnlySet <TValue> > ht,
                                                 TKey key,
                                                 out GrowOnlySet <TValue> set)
        {
            if (ht.TryGetValue(key, out set) == false)
            {
                set = SetFactory.New <TValue>( );

                ht[key] = set;

                return(false);
            }

            return(true);
        }