Skip to content

Commit

Permalink
Changes per PR review:
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
CraigHawker committed Jun 6, 2023
1 parent ea7181c commit 38df482
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Expand Up @@ -198,7 +198,7 @@ RecurringOperationConfigurationManager<TConfiguration> 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).
Expand Down
Expand Up @@ -98,9 +98,15 @@ public class ShowOnDashboardAttribute
public string RunCommandDisplayText { get; set; } = ShowOnDashboardAttribute.DefaultRunCommandDisplayText;

/// <summary>
/// Used to determine the order in which the task processors are shown on the dashboard
/// The default value for the <see cref="Order"/> property.
/// </summary>
public int Order { get; set; } = 100;
protected internal const int DefaultOrder = 100;

/// <summary>
/// Used to determine the order in which the task processors are shown on the dashboard.
/// Defaults to <see cref="DefaultOrder"/>.
/// </summary>
public int Order { get; set; } = ShowOnDashboardAttribute.DefaultOrder;

public ShowOnDashboardAttribute(string name)
{
Expand Down

0 comments on commit 38df482

Please sign in to comment.