示例#1
0
 public void SetStrategyB(IStrategyB strategyB)
 {
     System.Console.WriteLine("Changing Strategy B Logic");
     this._strategyB = strategyB;
 }
示例#2
0
 public Context(IStrategyA strategyA, IStrategyB strategyB)
 {
     this._strategyA = strategyA;
     this._strategyB = strategyB;
 }
示例#3
0
 public Consumer(IStrategyA strategyA, IStrategyB strategyB)
 {
     StrategyA = strategyA ?? throw new ArgumentNullException(nameof(strategyA));
     StrategyB = strategyB ?? throw new ArgumentNullException(nameof(strategyB));
 }