mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-12 11:55:24 +08:00
24 lines
792 B
C#
24 lines
792 B
C#
using System.Reflection;
|
|
using AntDesign.Docs.Highlight;
|
|
using AntDesign.Docs.Localization;
|
|
using AntDesign.Docs.Routing;
|
|
using AntDesign.Docs.Services;
|
|
|
|
namespace Microsoft.Extensions.DependencyInjection
|
|
{
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddAntDesignDocs(this IServiceCollection services)
|
|
{
|
|
services.AddAntDesign();
|
|
services.AddSingleton<RouteManager>();
|
|
services.AddScoped<DemoService>();
|
|
services.AddScoped<IconListService>();
|
|
services.AddSingleton<ILanguageService>(new InAssemblyLanguageService(Assembly.GetExecutingAssembly()));
|
|
services.AddScoped<IPrismHighlighter, PrismHighlighter>();
|
|
|
|
return services;
|
|
}
|
|
}
|
|
}
|