mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
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.
44 lines
1.6 KiB
44 lines
1.6 KiB
using Microsoft.Extensions.DependencyInjection;
|
|
using Volo.Abp.AspNetCore.Mvc.Localization;
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
|
|
using Volo.Abp.AutoMapper;
|
|
using Volo.Abp.Modularity;
|
|
using Volo.Abp.PermissionManagement.HttpApi;
|
|
using Volo.Abp.PermissionManagement.Localization;
|
|
using Volo.Abp.VirtualFileSystem;
|
|
|
|
namespace Volo.Abp.PermissionManagement.Web
|
|
{
|
|
[DependsOn(typeof(AbpPermissionManagementHttpApiModule))]
|
|
[DependsOn(typeof(AbpAspNetCoreMvcUiBootstrapModule))]
|
|
[DependsOn(typeof(AbpAutoMapperModule))]
|
|
public class AbpPermissionManagementWebModule : AbpModule
|
|
{
|
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
|
|
{
|
|
options.AddAssemblyResource(typeof(AbpPermissionManagementResource));
|
|
});
|
|
|
|
PreConfigure<IMvcBuilder>(mvcBuilder =>
|
|
{
|
|
mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpPermissionManagementWebModule).Assembly);
|
|
});
|
|
}
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
Configure<AbpVirtualFileSystemOptions>(options =>
|
|
{
|
|
options.FileSets.AddEmbedded<AbpPermissionManagementWebModule>();
|
|
});
|
|
|
|
context.Services.AddAutoMapperObjectMapper<AbpPermissionManagementWebModule>();
|
|
Configure<AbpAutoMapperOptions>(options =>
|
|
{
|
|
options.AddProfile<AbpPermissionManagementWebAutoMapperProfile>(validate: true);
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|