From 25d9b63ae980d65dfb8073f4d474c02e1211177b Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Wed, 8 May 2024 13:24:55 +0200 Subject: [PATCH 1/4] Update VERSION to 8.1.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8104cab..0e79152 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.1.0 +8.1.1 From a8898c41472d5e2085482d8563de319de078a6b8 Mon Sep 17 00:00:00 2001 From: Dennis Beuchler Date: Wed, 12 Jun 2024 12:59:09 +0200 Subject: [PATCH 2/4] Usage of Array.Empty instead of new array creation --- src/Moryx.ControlSystem/Cells/Session.cs | 2 +- src/Moryx.ControlSystem/Jobs/Job.cs | 4 ++-- src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs | 2 +- .../VisualInstructions/ActiveInstruction.cs | 2 +- src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Moryx.ControlSystem/Cells/Session.cs b/src/Moryx.ControlSystem/Cells/Session.cs index 2b3e738..7bfaa11 100644 --- a/src/Moryx.ControlSystem/Cells/Session.cs +++ b/src/Moryx.ControlSystem/Cells/Session.cs @@ -16,7 +16,7 @@ public abstract class Session /// /// Empty array of constraints /// - protected static readonly IConstraint[] EmptyConstraints = new IConstraint[0]; + protected static readonly IConstraint[] EmptyConstraints = Array.Empty(); /// /// Initialize a new resource request for a certain resource diff --git a/src/Moryx.ControlSystem/Jobs/Job.cs b/src/Moryx.ControlSystem/Jobs/Job.cs index 00d68c4..175d27c 100644 --- a/src/Moryx.ControlSystem/Jobs/Job.cs +++ b/src/Moryx.ControlSystem/Jobs/Job.cs @@ -63,7 +63,7 @@ public Job(IRecipe recipe, int amount) /// public IReadOnlyList RunningProcesses { - get => _runningProcesses ?? new IProcess[0]; + get => _runningProcesses ?? Array.Empty(); protected set => _runningProcesses = value; } @@ -73,7 +73,7 @@ public IReadOnlyList RunningProcesses /// public IReadOnlyList AllProcesses { - get => _allProcesses ?? new IProcess[0]; + get => _allProcesses ?? Array.Empty(); protected set => _allProcesses = value; } } diff --git a/src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs b/src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs index 3f8d3b8..09e624b 100644 --- a/src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs +++ b/src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs @@ -24,7 +24,7 @@ public abstract class JobSchedulerBase : IJobScheduler /// /// Empty array for jobs without dependencies /// - private readonly Job[] EmptyDependencies = new Job[0]; + private readonly Job[] EmptyDependencies = Array.Empty(); /// /// Dependency map that can be helpful for job scheduling diff --git a/src/Moryx.ControlSystem/VisualInstructions/ActiveInstruction.cs b/src/Moryx.ControlSystem/VisualInstructions/ActiveInstruction.cs index a31db33..e8c52c2 100644 --- a/src/Moryx.ControlSystem/VisualInstructions/ActiveInstruction.cs +++ b/src/Moryx.ControlSystem/VisualInstructions/ActiveInstruction.cs @@ -34,7 +34,7 @@ public class ActiveInstruction /// Results of the instruction /// [Obsolete("Use the result objects in 'Results' property instead!")] - public string[] PossibleResults { get; set; } = new string[0]; + public string[] PossibleResults { get; set; } = Array.Empty(); /// /// Possible results of the instruction diff --git a/src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs b/src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs index adabcba..c8b6a61 100644 --- a/src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs +++ b/src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs @@ -1,6 +1,7 @@ // Copyright (c) 2021, Phoenix Contact GmbH & Co. KG // Licensed under the Apache License, Version 2.0 +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -55,7 +56,7 @@ public virtual Task> PossibleRecipes(ProductIdenti { var product = ProductManagement.LoadType(identity); if (product == null) - return Task.FromResult>(new IProductRecipe[0]); + return Task.FromResult>(Array.Empty()); var recipes = ProductManagement.GetRecipes(product, RecipeClassification.Default | RecipeClassification.Alternative); return Task.FromResult(recipes); From edb61f14518ee4f3f81fddd8128cd93ef3cbc4ac Mon Sep 17 00:00:00 2001 From: Dennis Beuchler Date: Wed, 12 Jun 2024 13:00:07 +0200 Subject: [PATCH 3/4] Added state display name for jobs --- src/Moryx.ControlSystem/Jobs/Job.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Moryx.ControlSystem/Jobs/Job.cs b/src/Moryx.ControlSystem/Jobs/Job.cs index 175d27c..3495874 100644 --- a/src/Moryx.ControlSystem/Jobs/Job.cs +++ b/src/Moryx.ControlSystem/Jobs/Job.cs @@ -56,7 +56,13 @@ public Job(IRecipe recipe, int amount) /// Classification of the job /// public JobClassification Classification { get; set; } - + + /// + /// Detailed display name of the state + /// TODO: Remove this property in next major and replace with reworked JobClassification + /// + public virtual string StateDisplayName { get; protected set; } + private IReadOnlyList _runningProcesses; /// /// Currently running processes of the job From 6e00ae2b558f48054d25909eedd6a503ac36bc28 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Thu, 4 Jul 2024 11:49:22 +0200 Subject: [PATCH 4/4] Bump version to 8.2.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0e79152..fbb9ea1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.1.1 +8.2.0