Пример #1
0
 public IBalancingStrategy Make(BalancingStrategy balancingStrategy)
 {
     switch (balancingStrategy)
     {
         case BalancingStrategy.BruteForce:
             return new BruteForceBalancingStrategy();
         default:
             throw new ArgumentOutOfRangeException(nameof(balancingStrategy), balancingStrategy, null);
     }
 }
Пример #2
0
        public IBalancingStrategy Make(BalancingStrategy balancingStrategy)
        {
            switch (balancingStrategy)
            {
            case BalancingStrategy.BruteForce:
                return(new BruteForceBalancingStrategy());

            default:
                throw new ArgumentOutOfRangeException(nameof(balancingStrategy), balancingStrategy, null);
            }
        }