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.
48 lines
1.4 KiB
48 lines
1.4 KiB
1 year ago
|
using BaseService.Localization;
|
||
|
using Localization.Resources.AbpUi;
|
||
|
using Microsoft.Extensions.DependencyInjection;
|
||
|
using Volo.Abp.Account;
|
||
|
using Volo.Abp.Identity;
|
||
|
using Volo.Abp.Localization;
|
||
|
using Volo.Abp.Modularity;
|
||
|
using Volo.Abp.PermissionManagement.HttpApi;
|
||
|
using Volo.Abp.TenantManagement;
|
||
|
|
||
|
namespace BaseService
|
||
|
{
|
||
|
[DependsOn(
|
||
|
typeof(BaseServiceApplicationContractsModule),
|
||
|
typeof(AbpAccountHttpApiModule),
|
||
|
typeof(AbpPermissionManagementHttpApiModule),
|
||
|
typeof(AbpTenantManagementHttpApiModule),
|
||
|
typeof(AbpIdentityHttpApiModule)
|
||
|
)]
|
||
|
public class BaseServiceHttpApiModule : AbpModule
|
||
|
{
|
||
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
||
|
{
|
||
|
PreConfigure<IMvcBuilder>(mvcBuilder =>
|
||
|
{
|
||
|
mvcBuilder.AddApplicationPartIfNotExists(typeof(BaseServiceHttpApiModule).Assembly);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||
|
{
|
||
|
ConfigureLocalization();
|
||
|
}
|
||
|
|
||
|
private void ConfigureLocalization()
|
||
|
{
|
||
|
Configure<AbpLocalizationOptions>(options =>
|
||
|
{
|
||
|
options.Resources
|
||
|
.Get<BaseServiceResource>()
|
||
|
.AddBaseTypes(
|
||
|
typeof(AbpUiResource)
|
||
|
);
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
}
|