lith 3 سال پیش
والد
کامیت
5638a29e70

+ 1 - 1
dotnet/Library/Sers/Sers.Core/Sers.Core/SersLoader/ApiLoader.cs

@@ -378,7 +378,7 @@ namespace Sers.SersLoader
             #endregion
 
             object apiController_Obj = null;
-            if (config?.controllerLifetime == "Scoped" || config?.controllerLifetime == "Transient")
+            if (config?.controllerLifetime != "Scoped" && config?.controllerLifetime != "Transient")
                 apiController_Obj = Activator.CreateInstance(method.DeclaringType);
 
             //(x.2) apiDescs -> apiNode

+ 0 - 5
dotnet/ServiceStation/Demo/StressTest/App.Robot.Station/Controllers/TaskController.cs

@@ -11,11 +11,6 @@ namespace App.Robot.Station.Controllers
     public class TaskController : IApiController
     {
 
-        static TaskController()
-        {
-            TaskMng.Init();
-        } 
-
         /// <summary>
         /// 保存到Cache
         /// </summary>

+ 5 - 1
dotnet/ServiceStation/Demo/StressTest/App.Robot.Station/Program.cs

@@ -1,4 +1,6 @@
-using Sers.SersLoader;
+using App.Robot.Station.Logical;
+
+using Sers.SersLoader;
 using Sers.ServiceStation;
 using Vit.Extensions;
 
@@ -14,6 +16,8 @@ namespace App.Robot.Station
             //Sers.Core.Module.App.SersApplication.serviceStationInfo.stationVersion = "2.0.1";
 
 
+            TaskMng.Init();
+
             //(x.1) Init
             ServiceStation.Init();