-
Notifications
You must be signed in to change notification settings - Fork 1
/
Startup.cs
33 lines (30 loc) · 973 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
29
30
31
32
33
using EasyOC.Workflows.Timers;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Modules;
using OrchardCore.Workflows.Options;
using OCTimerEvent = OrchardCore.Workflows.Timers.TimerEvent;
namespace EasyOC.Workflows
{
public class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
}
}
[Feature(Constants.TimersFeautreId)]
[RequireFeatures("OrchardCore.Workflows.Timers")]
public class TimerStartup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.Configure<WorkflowOptions>(options =>
{
if (options.IsActivityRegistered<OCTimerEvent>())
{
options.UnregisterActivityType<OCTimerEvent>();
}
options.RegisterActivity<TimerEvent, TimerEventDisplayDriver>();
});
}
}
}