// This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();
            var config = new EnablexConfig();

            Configuration.Bind("EnableX", config);
            services.AddSingleton(config);
        }
示例#2
0
 public EnablexController(ILogger <EnablexController> logger, EnablexConfig iConfig)
 {
     _logger       = logger;
     enablexConfig = iConfig;
 }