-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathFlexWebModule.cs
More file actions
52 lines (44 loc) · 1.49 KB
/
FlexWebModule.cs
File metadata and controls
52 lines (44 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.DependencyInjection;
using Unity.Flex.Localization;
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.VirtualFileSystem;
namespace Unity.Flex.Web;
[DependsOn(
typeof(FlexApplicationContractsModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpAutoMapperModule)
)]
public class FlexWebModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(typeof(FlexResource), typeof(FlexWebModule).Assembly);
});
PreConfigure<IMvcBuilder>(mvcBuilder =>
{
mvcBuilder.AddApplicationPartIfNotExists(typeof(FlexWebModule).Assembly);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<FlexWebModule>();
});
context.Services.AddAutoMapperObjectMapper<FlexWebModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<FlexWebModule>(validate: true);
});
Configure<RazorPagesOptions>(options =>
{
//Configure authorization.
});
}
}