//--// public static bool CreateWithReferenceEquality <TKey, TValue>(GrowOnlyHashTable <TKey, GrowOnlySet <TValue> > ht, TKey key, out GrowOnlySet <TValue> set) where TValue : class { if (ht.TryGetValue(key, out set) == false) { set = SetFactory.NewWithReferenceEquality <TValue>( ); ht[key] = set; return(false); } return(true); }
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); }