chore: 更新 AdminService 到 Core 工程 Client 复用

This commit is contained in:
Argo-Tianyi 2022-01-03 10:17:25 +08:00
parent f87efc7c20
commit 4b707e9bc4
5 changed files with 12 additions and 15 deletions

View File

@ -1,9 +1,11 @@
using Bootstrap.Security.Blazor;
using BootstrapAdmin.Web.Core;
namespace BootstrapAdmin.Web.Services;
namespace BootstrapAdmin.Web.Core;
class AdminService : IBootstrapAdminService
/// <summary>
///
/// </summary>
public class AdminService : IBootstrapAdminService
{
private IUser User { get; set; }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Bootstrap.Security.Blazor" Version="6.0.0" />
<PackageReference Include="Bootstrap.Security.Blazor" Version="6.0.1-beta01" />
</ItemGroup>
<ItemGroup>

View File

@ -1,4 +1,5 @@
using BootstrapAdmin.Web.Services;
using BootstrapAdmin.Web.Core;
using BootstrapAdmin.Web.Services;
using BootstrapAdmin.Web.Services.SMS;
using BootstrapAdmin.Web.Services.SMS.Tencent;
using BootstrapAdmin.Web.Utils;
@ -20,14 +21,10 @@ namespace Microsoft.Extensions.DependencyInjection
/// <param name="services"></param>
public static IServiceCollection AddBootstrapBlazorAdmin(this IServiceCollection services)
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
services.AddLogging(logging => logging.AddFileLogger().AddCloudLogger().AddDBLogger(ExceptionsHelper.Log));
services.AddCors();
services.AddResponseCompression();
// 增加编码服务
services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
// 增加 健康检查服务
services.AddAdminHealthChecks();

View File

@ -1,4 +1,4 @@
using BootstrapAdmin.Web.Services;
using BootstrapAdmin.Web.Core;
using System.Text;
namespace Microsoft.Extensions.DependencyInjection
@ -14,8 +14,6 @@ namespace Microsoft.Extensions.DependencyInjection
/// <param name="services"></param>
public static IServiceCollection AddBootstrapBlazorClient(this IServiceCollection services)
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
services.AddCors();
services.AddResponseCompression();

View File

@ -29,9 +29,9 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\admin\Bootstrap.Admin\Bootstrap.Admin.csproj" />
<ProjectReference Include="..\..\src\admin\Bootstrap.DataAccess.MongoDB\Bootstrap.DataAccess.MongoDB.csproj" />
<ProjectReference Include="..\..\src\admin\Bootstrap.DataAccess\Bootstrap.DataAccess.csproj" />
<ProjectReference Include="..\..\src\mvc\admin\Bootstrap.Admin\Bootstrap.Admin.csproj" />
<ProjectReference Include="..\..\src\mvc\admin\Bootstrap.DataAccess.MongoDB\Bootstrap.DataAccess.MongoDB.csproj" />
<ProjectReference Include="..\..\src\mvc\admin\Bootstrap.DataAccess\Bootstrap.DataAccess.csproj" />
</ItemGroup>
</Project>