From 01520e50fcd24aebcf27a4281a4883beeba24b87 Mon Sep 17 00:00:00 2001 From: XorogVEVO Date: Sat, 19 Feb 2022 19:28:59 +0100 Subject: [PATCH] ScheduledTasks: Renamed UserId to CustomId --- Internal/Internal.cs | 2 +- UniversalExtensions.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Internal/Internal.cs b/Internal/Internal.cs index c757e23..5004c58 100644 --- a/Internal/Internal.cs +++ b/Internal/Internal.cs @@ -84,7 +84,7 @@ public class InternalSheduler public class taskInfo { - public string userId { get; internal set; } = ""; + public string customId { get; internal set; } = ""; internal CancellationTokenSource? tokenSource { get; set; } public DateTime? runTime { get; internal set; } } diff --git a/UniversalExtensions.cs b/UniversalExtensions.cs index eef69cc..2c14e5b 100644 --- a/UniversalExtensions.cs +++ b/UniversalExtensions.cs @@ -197,7 +197,8 @@ public static class UniversalExtensions /// The task to run /// The time to run the task /// An unique identifier of the task - public static string CreateScheduleTask(this Task task, DateTime runTime, string UserId = "") + + public static string CreateScheduleTask(this Task task, DateTime runTime, string CustomId = "") { string UID = Guid.NewGuid().ToString(); CancellationTokenSource CancellationToken = new CancellationTokenSource(); @@ -214,7 +215,7 @@ public static class UniversalExtensions task.Start(); }); - registeredScheduledTasks.Add(UID, new taskInfo { tokenSource = CancellationToken, userId = UserId, runTime = runTime}); + registeredScheduledTasks.Add(UID, new taskInfo { tokenSource = CancellationToken, customId = CustomId, runTime = runTime}); return UID; }