diff --git a/src/Foundation/ThingsGateway.CSScript/CSharpScriptEngineExtension.cs b/src/Foundation/ThingsGateway.CSScript/CSharpScriptEngineExtension.cs
index b1ec988a8..8aac0bd9c 100644
--- a/src/Foundation/ThingsGateway.CSScript/CSharpScriptEngineExtension.cs
+++ b/src/Foundation/ThingsGateway.CSScript/CSharpScriptEngineExtension.cs
@@ -8,13 +8,13 @@
// QQ群:605534569
//------------------------------------------------------------------------------
-using System.Reflection;
-using System.Text;
-
using CSScripting;
using CSScriptLib;
+using System.Reflection;
+using System.Text;
+
using ThingsGateway.NewLife.Caching;
using ThingsGateway.NewLife.Threading;
diff --git a/src/ThingsGateway.Photino/Services/BlazorHybridAuthenticationStateProvider.cs b/src/ThingsGateway.Photino/Services/BlazorHybridAuthenticationStateProvider.cs
index 80202d050..9e875b9ad 100644
--- a/src/ThingsGateway.Photino/Services/BlazorHybridAuthenticationStateProvider.cs
+++ b/src/ThingsGateway.Photino/Services/BlazorHybridAuthenticationStateProvider.cs
@@ -12,27 +12,15 @@ using Microsoft.AspNetCore.Components.Authorization;
using System.Security.Claims;
-using ThingsGateway.Admin.Application;
-
namespace ThingsGateway.Photino;
///
public class BlazorHybridAuthenticationStateProvider : AuthenticationStateProvider
{
- private readonly ISysDictService _sysDictService;
- private readonly ISysRoleService _sysRoleService;
- private readonly ISysUserService _sysUserService;
- private readonly IVerificatInfoService _verificatInfoService;
private readonly IAppService _appService;
- public BlazorHybridAuthenticationStateProvider(IVerificatInfoService verificatInfoService,
- IAppService appService,
- ISysUserService sysUserService, ISysRoleService sysRoleService, ISysDictService sysDictService)
+ public BlazorHybridAuthenticationStateProvider(IAppService appService)
{
- _sysUserService = sysUserService;
- _sysRoleService = sysRoleService;
- _sysDictService = sysDictService;
- _verificatInfoService = verificatInfoService;
_appService = appService;
}
@@ -46,6 +34,4 @@ public class BlazorHybridAuthenticationStateProvider : AuthenticationStateProvid
{
return Task.FromResult(currentUser);
}
-
-
}
diff --git a/src/ThingsGateway.Photino/Services/BlazorHybridAuthorizationHandler.cs b/src/ThingsGateway.Photino/Services/BlazorHybridAuthorizationHandler.cs
index ef84d41a2..f184d426d 100644
--- a/src/ThingsGateway.Photino/Services/BlazorHybridAuthorizationHandler.cs
+++ b/src/ThingsGateway.Photino/Services/BlazorHybridAuthorizationHandler.cs
@@ -33,5 +33,4 @@ public class BlazorHybridAuthorizationHandler : BlazorAuthenticationStateProvide
return base.HandleAsync(context, httpContext);
}
-
}
diff --git a/src/ThingsGateway.Photino/Startup.cs b/src/ThingsGateway.Photino/Startup.cs
index f4321f484..7c689c2e1 100644
--- a/src/ThingsGateway.Photino/Startup.cs
+++ b/src/ThingsGateway.Photino/Startup.cs
@@ -290,12 +290,11 @@ public class Startup : AppStartup
services.AddScoped(a =>
{
- var sysResourceService = a.GetService();
- var userCenterService = a.GetService();
- var userService = a.GetService();
- var appContext = new BlazorAppContext(sysResourceService, userCenterService, userService);
+ var appContext = new BlazorAppContext(
+ a.GetService(),
+ a.GetService(),
+ a.GetService());
appContext.TitleLocalizer = a.GetRequiredService>();
-
return appContext;
});