mirror of https://github.com/abpframework/abp
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.
63 lines
2.2 KiB
63 lines
2.2 KiB
using Localization.Resources.AbpUi;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using ProductManagement.Localization;
|
|
using Volo.Abp.AspNetCore.Mvc.Localization;
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
|
|
using Volo.Abp.AutoMapper;
|
|
using Volo.Abp.Localization;
|
|
using Volo.Abp.Localization.Resources.AbpValidation;
|
|
using Volo.Abp.Modularity;
|
|
using Volo.Abp.UI.Navigation;
|
|
using Volo.Abp.VirtualFileSystem;
|
|
|
|
namespace ProductManagement
|
|
{
|
|
[DependsOn(typeof(ProductManagementHttpApiModule))]
|
|
[DependsOn(typeof(AbpAspNetCoreMvcUiThemeSharedModule))]
|
|
[DependsOn(typeof(AbpAutoMapperModule))]
|
|
public class ProductManagementWebModule : AbpModule
|
|
{
|
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
|
|
{
|
|
options.AddAssemblyResource(typeof(ProductManagementResource), typeof(ProductManagementWebModule).Assembly);
|
|
});
|
|
}
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
Configure<NavigationOptions>(options =>
|
|
{
|
|
options.MenuContributors.Add(new ProductManagementMenuContributor());
|
|
});
|
|
|
|
Configure<AbpVirtualFileSystemOptions>(options =>
|
|
{
|
|
options.FileSets.AddEmbedded<ProductManagementWebModule>("ProductManagement");
|
|
});
|
|
|
|
Configure<AbpLocalizationOptions>(options =>
|
|
{
|
|
options.Resources
|
|
.Get<ProductManagementResource>()
|
|
.AddBaseTypes(
|
|
typeof(AbpValidationResource),
|
|
typeof(AbpUiResource)
|
|
).AddVirtualJson("/Localization/Resources/ProductManagement");
|
|
});
|
|
|
|
Configure<AbpAutoMapperOptions>(options =>
|
|
{
|
|
options.AddProfile<ProductManagementWebAutoMapperProfile>(validate: true);
|
|
});
|
|
|
|
Configure<RazorPagesOptions>(options =>
|
|
{
|
|
//Configure authorization.
|
|
});
|
|
}
|
|
}
|
|
}
|