Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ITableExport): update ITableExport to TryAddTransient #2584

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void Invoke(BootstrapBlazorOptions option)
// 增加 AzureTranslator 服务
services.AddBootstrapBlazorAzureTranslator();

// 增加 Pdf 导出服务
// 增加 Html2Pdf 导出服务
services.AddBootstrapBlazorHtml2PdfService();

// 配置 Tab 与 Menu 联动字典
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>8.0.1-beta01</Version>
<Version>8.0.1-beta02</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Website: https://www.blazor.zone or https://argozhang.github.io/

using Microsoft.Extensions.DependencyInjection.Extensions;

namespace Microsoft.Extensions.DependencyInjection;

/// <summary>
Expand All @@ -16,7 +18,7 @@ public static class TableExportServiceCollectionExtensions
/// <returns></returns>
public static IServiceCollection AddBootstrapBlazorTableExcelExport(this IServiceCollection services)
{
services.AddTransient<ITableExport, DefaultTableExport>();
services.TryAddTransient<ITableExport, DefaultTableExport>();
return services;
}
}