public Calculator(CalculatorParameter calculatorParameter) { this.calculatorParameter = calculatorParameter; }
public AddMethod(CalculatorParameter calculatorParameter) { // an example that shows that you can pass parameters from dependency injection to consructor. this.calculatorParameter = calculatorParameter ?? throw new ArgumentNullException(nameof(calculatorParameter)); }