Skip to content

Commit 1a9c435

Browse files
committed
Fixed MassTransit#6017 - made ScheduleId and ScheduleGroup settable
1 parent 1f865a5 commit 1a9c435

1 file changed

Lines changed: 20 additions & 21 deletions

File tree

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
namespace MassTransit.Scheduling
2-
{
3-
using System;
1+
namespace MassTransit.Scheduling;
42

3+
using System;
54

6-
public abstract class DefaultRecurringSchedule :
7-
RecurringSchedule
8-
{
9-
protected DefaultRecurringSchedule()
10-
{
11-
ScheduleId = TypeCache.GetShortName(GetType());
12-
ScheduleGroup = GetType().Assembly.FullName.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)[0];
135

14-
TimeZoneId = TimeZoneInfo.Local.Id;
15-
StartTime = DateTime.Now;
16-
}
6+
public abstract class DefaultRecurringSchedule :
7+
RecurringSchedule
8+
{
9+
protected DefaultRecurringSchedule()
10+
{
11+
ScheduleId = TypeCache.GetShortName(GetType());
12+
ScheduleGroup = GetType().Assembly.FullName.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)[0];
1713

18-
public MissedEventPolicy MisfirePolicy { get; protected set; }
19-
public string TimeZoneId { get; protected set; }
20-
public DateTimeOffset StartTime { get; protected set; }
21-
public DateTimeOffset? EndTime { get; protected set; }
22-
public string ScheduleId { get; private set; }
23-
public string ScheduleGroup { get; private set; }
24-
public string CronExpression { get; protected set; }
25-
public string Description { get; protected set; }
14+
TimeZoneId = TimeZoneInfo.Local.Id;
15+
StartTime = DateTime.Now;
2616
}
17+
18+
public MissedEventPolicy MisfirePolicy { get; protected set; }
19+
public string TimeZoneId { get; protected set; }
20+
public DateTimeOffset StartTime { get; protected set; }
21+
public DateTimeOffset? EndTime { get; protected set; }
22+
public string ScheduleId { get; protected set; }
23+
public string ScheduleGroup { get; protected set; }
24+
public string CronExpression { get; protected set; }
25+
public string Description { get; protected set; }
2726
}

0 commit comments

Comments
 (0)