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