public SampleFunction(MyServiceA serviceA, MyServiceB serviceB, IGlobalIdProvider globalIdProvider) { _serviceA = serviceA ?? throw new ArgumentNullException(nameof(serviceA)); _serviceB = serviceB ?? throw new ArgumentNullException(nameof(serviceB)); _globalIdProvider = globalIdProvider ?? throw new ArgumentNullException(nameof(globalIdProvider)); }
// Batche inject Config on constructor. public Baz(IOptions <SingleContainedAppWithConfig.AppConfig> config, MyServiceA serviceA, MyServiceB serviceB, MyServiceC serviceC) { this.config = config; }