Пример #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);
        }
Пример #2
0
        //
        // Constructor Methods
        //

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