forked from InEngine-NET/InEngine.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCronTrigger.cs
More file actions
24 lines (22 loc) · 1.07 KB
/
CronTrigger.cs
File metadata and controls
24 lines (22 loc) · 1.07 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
using Nest;
using System;
using System.Collections.Generic;
namespace IntegrationEngine.Model
{
public class CronTrigger : ICronTrigger
{
public virtual string Id { get; set; }
public virtual string JobType { get; set; }
public virtual string CronExpressionString { get; set; }
public virtual int StateId { get; set; }
public virtual IDictionary<string, string> Parameters { get; set; }
[ElasticProperty(OptOut = true)]
public virtual string CronExpressionDescription { get { return CronExpressionString.GetHumanReadableCronSchedule(); } }
[ElasticProperty(OptOut = true)]
public virtual string StateDescription { get { return StateId.GetStateDescription(); } }
public override string ToString()
{
return string.Format("[CronTrigger: Id={0}, JobType={1}, CronExpressionString={2}, StateId={3}, Parameters={4}, CronExpressionDescription={5}, StateDescription={6}]", Id, JobType, CronExpressionString, StateId, Parameters, CronExpressionDescription, StateDescription);
}
}
}