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.
56 lines
1.8 KiB
56 lines
1.8 KiB
using Microsoft.Extensions.DependencyInjection;
|
|
using Volo.Abp.Account.Blazor.Pages.Account;
|
|
using Volo.Abp.AspNetCore.Components.Web.Theming;
|
|
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
|
|
using Volo.Abp.AutoMapper;
|
|
using Volo.Abp.Modularity;
|
|
using Volo.Abp.ObjectExtending;
|
|
using Volo.Abp.ObjectExtending.Modularity;
|
|
using Volo.Abp.Threading;
|
|
using Volo.Abp.UI.Navigation;
|
|
|
|
namespace Volo.Abp.Account.Blazor;
|
|
|
|
[DependsOn(
|
|
typeof(AbpAspNetCoreComponentsWebThemingModule),
|
|
typeof(AbpAutoMapperModule),
|
|
typeof(AbpAccountApplicationContractsModule)
|
|
)]
|
|
public class AbpAccountBlazorModule : AbpModule
|
|
{
|
|
private readonly static OneTimeRunner OneTimeRunner = new OneTimeRunner();
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.AddAutoMapperObjectMapper<AbpAccountBlazorModule>();
|
|
|
|
Configure<AbpAutoMapperOptions>(options =>
|
|
{
|
|
options.AddProfile<AbpAccountBlazorAutoMapperProfile>(validate: true);
|
|
});
|
|
|
|
Configure<AbpNavigationOptions>(options =>
|
|
{
|
|
options.MenuContributors.Add(new AbpAccountBlazorUserMenuContributor());
|
|
});
|
|
|
|
Configure<AbpRouterOptions>(options =>
|
|
{
|
|
options.AdditionalAssemblies.Add(typeof(AbpAccountBlazorModule).Assembly);
|
|
});
|
|
}
|
|
|
|
public override void PostConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
OneTimeRunner.Run(() =>
|
|
{
|
|
ModuleExtensionConfigurationHelper
|
|
.ApplyEntityConfigurationToUi(
|
|
IdentityModuleExtensionConsts.ModuleName,
|
|
IdentityModuleExtensionConsts.EntityNames.User,
|
|
editFormTypes: new[] { typeof(PersonalInfoModel) }
|
|
);
|
|
});
|
|
}
|
|
}
|