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.
41 lines
1.3 KiB
41 lines
1.3 KiB
using Localization.Resources.AbpUi; |
|
using Microsoft.Extensions.DependencyInjection; |
|
using Volo.Abp.AspNetCore.Mvc; |
|
using Volo.Abp.AspNetCore.Mvc.Localization; |
|
using Volo.Abp.AuditLogging.Localization; |
|
using Volo.Abp.Localization; |
|
using Volo.Abp.Modularity; |
|
|
|
namespace Sanhe.Abp.Auditing |
|
{ |
|
[DependsOn( |
|
typeof(AbpAspNetCoreMvcModule), |
|
typeof(AbpAuditingApplicationContractsModule))] |
|
public class AbpAuditingHttpApiModule : AbpModule |
|
{ |
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
|
{ |
|
PreConfigure<IMvcBuilder>(mvcBuilder => |
|
{ |
|
mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpAuditingHttpApiModule).Assembly); |
|
}); |
|
|
|
PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options => |
|
{ |
|
options.AddAssemblyResource(typeof(AuditLoggingResource), typeof(AbpAuditingApplicationContractsModule).Assembly); |
|
}); |
|
} |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
{ |
|
Configure<AbpLocalizationOptions>(options => |
|
{ |
|
options.Resources |
|
.Get<AuditLoggingResource>() |
|
.AddBaseTypes( |
|
typeof(AbpUiResource) |
|
); |
|
}); |
|
} |
|
} |
|
}
|
|
|