You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
719 B
22 lines
719 B
2 years ago
|
using Masa.Blazor.Pro.Global;
|
||
|
using Masa.Blazor.Pro.Global.Nav.Model;
|
||
|
using System.Reflection;
|
||
|
|
||
|
namespace Microsoft.Extensions.DependencyInjection
|
||
|
{
|
||
|
public static class ServiceCollectionExtensions
|
||
|
{
|
||
|
public static IServiceCollection AddGlobalForServer(this IServiceCollection services)
|
||
|
{
|
||
|
//services.AddMasaI18nForServer("wwwroot/i18n");
|
||
|
var basePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? throw new Exception("Get the assembly root directory exception!");
|
||
|
services.AddNav(Path.Combine(basePath, $"wwwroot/nav/nav.json"));
|
||
|
//services.AddScoped<GlobalConfig>();
|
||
|
|
||
|
return services;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|