-
Notifications
You must be signed in to change notification settings - Fork 0
/
Startup.cs
28 lines (23 loc) · 988 Bytes
/
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
using CSM.Bynder.Drivers;
using CSM.Bynder.Fields;
using CSM.Bynder.Settings;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Display.ContentDisplay;
using OrchardCore.ContentTypes.Editors;
using OrchardCore.Environment.Shell.Configuration;
using OrchardCore.Modules;
namespace CSM.Bynder;
public class Startup : StartupBase
{
private readonly IShellConfiguration _shellConfiguration;
public Startup(IShellConfiguration shellConfiguration) =>
_shellConfiguration = shellConfiguration;
public override void ConfigureServices(IServiceCollection services)
{
services.Configure<BynderOptions>(_shellConfiguration.GetSection("CSM_Bynder"));
services.AddContentField<BynderField>()
.UseDisplayDriver<BynderFieldDisplayDriver>();
services.AddScoped<IContentPartFieldDefinitionDisplayDriver, BynderFieldSettingsDriver>();
}
}