I build and register configuration with my custom values:
IConfiguration configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.Build();
container.RegisterInstanceAs<IConfiguration>(configuration);
this is done inside method with [BeforeScenario(Order = 1)] annotation, I'd like to do it in method annotated by [BeforeTestRun] tag, but this one needs to be static. This means that I can't inject BoDi DI container into this method.
Thus how to load the configuration only once per test run and make it avaialble everywhere by DI container?