Пример #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            CBaseCloneSearchStrategy p = obj as CBaseCloneSearchStrategy;

            if ((object)p == null)
            {
                return(false);
            }

            return(AlgorithmID() == p.AlgorithmID());
        }
        public static CBaseCloneSearchStrategy GetAlgorithm(CloneSearchAlgoritms AlgorithmID)
        {
            CBaseCloneSearchStrategy value = null;

            switch (AlgorithmID)
            {
            case CloneSearchAlgoritms.BruteForceAlgorithm:
                value = new CBruteForceAlgorithm();
                break;

            case CloneSearchAlgoritms.HashBucketAlgorithm:
                value = new CHashBucketAlgorithm();
                break;
            }

            System.Diagnostics.Debug.Assert(value != null, "Error! value is null!");
            return(value);
        }
Пример #3
0
 public CCloneSearchProvider(CBaseCloneSearchStrategy _CloneSearchStrategy)
 {
     m_CloneSearchStrategy = _CloneSearchStrategy;
     m_ClonedRowsMatrix    = new CClonedRowsMatrix();
 }