mirror of https://github.com/abpframework/eventhub
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.
60 lines
1.9 KiB
60 lines
1.9 KiB
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Payment.Localization;
|
|
using Payment.Web.Menus;
|
|
using Volo.Abp.AspNetCore.Mvc;
|
|
using Volo.Abp.AspNetCore.Mvc.Localization;
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
|
|
using Volo.Abp.AutoMapper;
|
|
using Volo.Abp.Modularity;
|
|
using Volo.Abp.UI.Navigation;
|
|
using Volo.Abp.VirtualFileSystem;
|
|
|
|
namespace Payment.Web
|
|
{
|
|
[DependsOn(
|
|
typeof(PaymentApplicationContractsModule),
|
|
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
|
|
typeof(AbpAutoMapperModule),
|
|
typeof(AbpAspNetCoreMvcModule)
|
|
)]
|
|
public class PaymentWebModule : AbpModule
|
|
{
|
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
|
|
{
|
|
options.AddAssemblyResource(typeof(PaymentResource), typeof(PaymentWebModule).Assembly);
|
|
});
|
|
|
|
PreConfigure<IMvcBuilder>(mvcBuilder =>
|
|
{
|
|
mvcBuilder.AddApplicationPartIfNotExists(typeof(PaymentWebModule).Assembly);
|
|
});
|
|
}
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
Configure<AbpNavigationOptions>(options =>
|
|
{
|
|
options.MenuContributors.Add(new PaymentMenuContributor());
|
|
});
|
|
|
|
Configure<AbpVirtualFileSystemOptions>(options =>
|
|
{
|
|
options.FileSets.AddEmbedded<PaymentWebModule>();
|
|
});
|
|
|
|
context.Services.AddAutoMapperObjectMapper<PaymentWebModule>();
|
|
Configure<AbpAutoMapperOptions>(options =>
|
|
{
|
|
options.AddMaps<PaymentWebModule>(validate: true);
|
|
});
|
|
|
|
Configure<RazorPagesOptions>(options =>
|
|
{
|
|
//Configure authorization.
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|