From c4014c933376ee5d98d92193ed9196e8f5b21e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= Date: Fri, 16 Dec 2022 16:00:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Framework.Net6/Yi.Framework.XUnitTest/Startup.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Yi.Framework.Net6/Yi.Framework.XUnitTest/Startup.cs b/Yi.Framework.Net6/Yi.Framework.XUnitTest/Startup.cs index 2ce4bae0..dcd397fe 100644 --- a/Yi.Framework.Net6/Yi.Framework.XUnitTest/Startup.cs +++ b/Yi.Framework.Net6/Yi.Framework.XUnitTest/Startup.cs @@ -43,15 +43,15 @@ namespace Yi.Framework.XUnitTest host.ConfigureServices(services => { }); } - private IServiceCollection _iServiceCollection; + private IServiceCollection _iServiceCollection=null!; public void ConfigureServices(IServiceCollection services, HostBuilderContext host) { services.AddIocService(host.Configuration); - ConfigureServices2(services); + ConfigureTrueServices(services); _iServiceCollection = services; } - public void ConfigureServices2(IServiceCollection services) + public void ConfigureTrueServices(IServiceCollection services) { services.AddQuartzService(); services.AddSqlsugarServer(); @@ -63,11 +63,11 @@ namespace Yi.Framework.XUnitTest var appBuild = WebApplication.CreateBuilder(); appBuild.WebHost.ConfigureServices(sc => { - ConfigureServices2(sc); + ConfigureTrueServices(sc); }); - var app2 = appBuild.Build(); - app2.UseDbSeedInitService(); + var app = appBuild.Build(); + app.UseDbSeedInitService(); } } }