I have asp net webapi and i'm need resolve some options in startup file. Option here has simple class what take parameters from json configuration. In startup registering the optionsAutofacModule where register configuration section what i'm need. Example: RegisterConfigurationOptions<IdentitySettings>(builder, configuration.GetSection("Identity"));
in OptionAutofacModule, whitch the containerBuilder.RegisterModule<OptionsAutofacModule>();
, which called in startup .cs. So, i'm need access to "identitysettings" inside method in startup.cs.
Edit 0: I have net core project and classic asp net web api. Net core project using configuration, what resolving from json file. I can access to this configuration inside controllers classical .net webapi project, using IOptions. But i can't access to this options inside startup.cs
In theory, the solution is simple, but I forgot about beginscope. Solution:
where config is HttpConfiguration