fix: Streamlines event scheduler API. Adds months to weekly recurrence (#2178)
This commit is contained in:
parent
990e86b983
commit
f95b3a8b3b
11 changed files with 347 additions and 137 deletions
22
Projects/UOContent/Engines/Events/AllowedDays.cs
Normal file
22
Projects/UOContent/Engines/Events/AllowedDays.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Events;
|
||||
|
||||
[Flags]
|
||||
public enum AllowedDays : byte
|
||||
{
|
||||
None = 0,
|
||||
Sunday = 1 << 0,
|
||||
Monday = 1 << 1,
|
||||
Tuesday = 1 << 2,
|
||||
Wednesday = 1 << 3,
|
||||
Thursday = 1 << 4,
|
||||
Friday = 1 << 5,
|
||||
Saturday = 1 << 6,
|
||||
All = Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday
|
||||
}
|
||||
|
||||
public static class DaysOfWeekExtension
|
||||
{
|
||||
public static AllowedDays ToDaysOfWeek(this DayOfWeek dayOfWeek) => (AllowedDays)(1 << (int)dayOfWeek);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue