Exemplo n.º 1
0
 public WorkContext(string type)
 {
     switch (type)
     {
         case "A":
             algorithm = new AlgorithmA(); break;
         case "B":
             algorithm = new AlgorithmB(); break;
         case "C":
             algorithm = new AlgorithmC(); break;
         default:
             break;
     }
 }
Exemplo n.º 2
0
        public WorkContext(string type)
        {
            switch (type)
            {
            case "A":
                algorithm = new AlgorithmA(); break;

            case "B":
                algorithm = new AlgorithmB(); break;

            case "C":
                algorithm = new AlgorithmC(); break;

            default:
                break;
            }
        }