From 38df482e8c9407e818e8a5434dc5e7f205a19503 Mon Sep 17 00:00:00 2001 From: Craig Hawker Date: Tue, 6 Jun 2023 16:18:26 +0100 Subject: [PATCH] Changes per PR review: Moved default order to be constant. Altered code to use the constant rather than hard-code the value. Altered comment to explicitly state what the default is. --- ...askManagerExAsynchronousDashboardContentProvider.cs | 2 +- .../Dashboards/TaskQueues/ShowOnDashboardAttribute.cs | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/MFiles.VAF.Extensions/Dashboards/AsynchronousDashboardContent/TaskManagerExAsynchronousDashboardContentProvider.cs b/MFiles.VAF.Extensions/Dashboards/AsynchronousDashboardContent/TaskManagerExAsynchronousDashboardContentProvider.cs index 18da79d..751fa73 100644 --- a/MFiles.VAF.Extensions/Dashboards/AsynchronousDashboardContent/TaskManagerExAsynchronousDashboardContentProvider.cs +++ b/MFiles.VAF.Extensions/Dashboards/AsynchronousDashboardContent/TaskManagerExAsynchronousDashboardContentProvider.cs @@ -198,7 +198,7 @@ RecurringOperationConfigurationManager recurringOperationConfigu Description = showOnDashboardAttribute?.Description, Commands = commands, TasksInQueue = waitingTasks, - Order = showOnDashboardAttribute?.Order ?? 100, + Order = showOnDashboardAttribute?.Order ?? ShowOnDashboardAttribute.DefaultOrder, RecurrenceConfiguration = recurrenceConfiguration }, // Get known executions (prior, running and future). diff --git a/MFiles.VAF.Extensions/Dashboards/TaskQueues/ShowOnDashboardAttribute.cs b/MFiles.VAF.Extensions/Dashboards/TaskQueues/ShowOnDashboardAttribute.cs index 76cc342..2e0eb5a 100644 --- a/MFiles.VAF.Extensions/Dashboards/TaskQueues/ShowOnDashboardAttribute.cs +++ b/MFiles.VAF.Extensions/Dashboards/TaskQueues/ShowOnDashboardAttribute.cs @@ -98,9 +98,15 @@ public class ShowOnDashboardAttribute public string RunCommandDisplayText { get; set; } = ShowOnDashboardAttribute.DefaultRunCommandDisplayText; /// - /// Used to determine the order in which the task processors are shown on the dashboard + /// The default value for the property. /// - public int Order { get; set; } = 100; + protected internal const int DefaultOrder = 100; + + /// + /// Used to determine the order in which the task processors are shown on the dashboard. + /// Defaults to . + /// + public int Order { get; set; } = ShowOnDashboardAttribute.DefaultOrder; public ShowOnDashboardAttribute(string name) {