コード例 #1
0
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
            BaseController.Configuration = Configuration; // 添加到控制器(便于在控制器中获取配置文件)

            ResourceFilesController.EnabledMemoryCached = Configuration.GetValue <bool>("ResourceFilesMemoryCached");
            ResourceFilesController.InitializeHttpContentTypes();
        }
コード例 #2
0
 public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     BaseController.Configuration = Configuration; // 添加到控制器(便于在控制器中获取配置文件)
     ResourceFilesController.InitializeHttpContentTypes();
 }