Exemplo n.º 1
0
        public static CleaningAlgorithm CreateCleaningAlgorithm(CleaningAlgorithmType inAlgorithmType, AlgorithmEssentials inAlgorithmEssentials)
        {
            CleaningAlgorithm cleaningAlgorithm;

            switch (inAlgorithmType)
            {
            case CleaningAlgorithmType.CircularCleaningAlgorithm:
            {
                cleaningAlgorithm = new CircularCleaningAlgorithm(inAlgorithmEssentials,
                                                                  HandlerContainerFactory.CreateHandlerContainer(HandlerContainerType.CircularCleaningAlgorithm, inAlgorithmEssentials));
                break;
            }

            default:
                cleaningAlgorithm = null;
                break;
            }

            return(cleaningAlgorithm);
        }
        public static ReturnAlgorithm CreateReturnAlgorithm(ReturnAlgorithmType inReturnAlgorithm, AlgorithmEssentials inAlgorithmEssentials)
        {
            ReturnAlgorithm returnAlgorithm;

            switch (inReturnAlgorithm)
            {
            case ReturnAlgorithmType.SimpleReturnAlgorithm:
            {
                returnAlgorithm = new SimpleReturnAlgorithm(inAlgorithmEssentials,
                                                            HandlerContainerFactory.CreateHandlerContainer(HandlerContainerType.SimpleReturnAlgorithm, inAlgorithmEssentials));
                break;
            }

            default:
                returnAlgorithm = null;
                break;
            }

            return(returnAlgorithm);
        }