namespace Xorog.UniversalExtensions.Entities; public class ScheduledTask { internal ScheduledTask() { this.Uid = Guid.NewGuid().ToString(); } /// /// The unique identifier of this task. /// public string Uid { get; internal set; } /// /// The custom data asscociated with this task. /// public object? CustomData { get; internal set; } /// /// The time this task will run. /// public DateTime? RunTime { get; internal set; } /// /// The to prematurely dequeue this task. /// internal CancellationTokenSource? TokenSource { get; set; } = new(); /// /// Delete this task. /// public void Delete() => ScheduledTaskExtensions.DeleteScheduledTask(Uid); }