Exemple #1
0
        //--//

        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);
        }
        //
        // Constructor Methods
        //

        protected GenericDepthFirst( )
        {
            m_visited = SetFactory.NewWithReferenceEquality <ITreeNode <FC> >( );
        }