Beispiel #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;
     }
 }
Beispiel #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;
            }
        }