/// <summary> /// Initializes a new instance of the <see cref="OrderController"/> class. /// FeatureFlag logic outside the code /// </summary> public OrderController() { _orderSystem = new OrderSystem(); // let the feature flag determine which calculator to use if (NewPostageCalculationFeature.FeatureEnabled) { _postageCalculator = new AdvancedPostageCalculator(); } else { _postageCalculator = new PostageCalculator(); } }
public double Accept(IPostageCalculator calculator) { return(calculator.Visit(this)); }
public double Accept(IPostageCalculator calculator) { return calculator.Visit(this); }
public BusySeasonCalculator(IPostageCalculator postageCalculator) { this.postageCalculator = postageCalculator; }
public PostageCalculator(IPostageCalculator calculator) { this.calculator = calculator; }