Ejemplo n.º 1
0
 public FolderBaseModuleManager(IOptions <ModuleOptions> options, IWebHostEnvironment hostEnv)
 {
     _options = options.Value;
     _hostEnv = hostEnv;
     HostLoader.AddSharedAssembly(
         typeof(IHostBuilder).Assembly,
         typeof(IApplicationBuilder).Assembly,
         typeof(HttpContext).Assembly,
         typeof(IHost).Assembly,
         typeof(IServiceCollection).Assembly
         //typeof(Microsoft.Extensions.Logging.LoggingBuilderExtensions).Assembly
         );
     HostLoader.ForceHostShared(asbn => asbn.Name.StartsWith("Microsoft.Extensions.") &&
                                asbn.Name != "Microsoft.Extensions.DependencyModel");
     //HostLoader.ForceHostShared(asbn => asbn.Name.StartsWith("Microsoft.AspNetCore.")
     //                                   && !asbn.Name.StartsWith("Microsoft.AspNetCore.SpaServices")
     //                                   && asbn.Name != "Microsoft.AspNetCore.Authentication.JwtBearer");
     //HostLoader.ForceHostShared(asbn => asbn.Name.StartsWith("Microsoft.EntityFrameworkCore"));
 }
 public FolderBaseModuleManager(IOptions <ModuleOptions> options, IWebHostEnvironment hostEnv)
 {
     _options = options.Value;
     _hostEnv = hostEnv;
 }