-
Notifications
You must be signed in to change notification settings - Fork 0
/
Startup.cs
41 lines (36 loc) · 1.39 KB
/
Startup.cs
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
using Fluid;
using M96Dev.TaxonomyPosts.Drivers;
using M96Dev.TaxonomyPosts.Handlers;
using M96Dev.TaxonomyPosts.Models;
using M96Dev.TaxonomyPosts.Settings;
using M96Dev.TaxonomyPosts.ViewModels;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Display.ContentDisplay;
using OrchardCore.ContentManagement.Handlers;
using OrchardCore.ContentTypes.Editors;
using OrchardCore.Data.Migration;
using OrchardCore.Modules;
namespace M96Dev.TaxonomyPosts
{
public class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.Configure<TemplateOptions>(o =>
{
o.MemberAccessStrategy.Register<TaxonomyPostsPartViewModel>();
});
services.AddContentPart<TaxonomyPostsPart>()
.UseDisplayDriver<TaxonomyPostsPartDisplayDriver>()
.AddHandler<TaxonomyPostsPartHandler>();
services.AddScoped<IContentTypePartDefinitionDisplayDriver, TaxonomyPostsPartSettingsDisplayDriver>();
services.AddDataMigration<Migrations>();
}
public override void Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
{
}
}
}