Skip to content

Commit

Permalink
Merge pull request #86 from PHOENIXCONTACT/fix/results-from-enum-exte…
Browse files Browse the repository at this point in the history
…nsion

Instructor extension did not set the new results
  • Loading branch information
Toxantron authored Jul 18, 2024
2 parents 6e00ae2 + df32d3a commit 0cce9f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.2.0
8.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ public static long Execute(this IVisualInstructor instructor, string title, Acti
{
Title = title,
Instructions = instructions,
PossibleResults = results
PossibleResults = results,

Check warning on line 99 in src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

View workflow job for this annotation

GitHub Actions / Build / Build

'ActiveInstruction.PossibleResults' is obsolete: 'Use the result objects in 'Results' property instead!'

Check warning on line 99 in src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

View workflow job for this annotation

GitHub Actions / UnitTests / UnitTests

'ActiveInstruction.PossibleResults' is obsolete: 'Use the result objects in 'Results' property instead!'

Check warning on line 99 in src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

View workflow job for this annotation

GitHub Actions / IntegrationTests / IntegrationTests

'ActiveInstruction.PossibleResults' is obsolete: 'Use the result objects in 'Results' property instead!'
Results = results.Select(r => new InstructionResult { Key = r, DisplayValue = r }).ToArray()
}, callback);
}

Expand Down Expand Up @@ -161,11 +162,13 @@ private static long ExecuteWithEnum(this IVisualInstructor instructor, string ti
throw new ArgumentException("Result type is not an enum!");

var results = EnumInstructionResult.PossibleResults(attr.ResultEnum);
var resultObjects = EnumInstructionResult.PossibleInstructionResults(attr.ResultEnum);
return instructor.Execute(new ActiveInstruction
{
Title = title,
Instructions = parameters,
PossibleResults = results,

Check warning on line 170 in src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

View workflow job for this annotation

GitHub Actions / Build / Build

'ActiveInstruction.PossibleResults' is obsolete: 'Use the result objects in 'Results' property instead!'

Check warning on line 170 in src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

View workflow job for this annotation

GitHub Actions / UnitTests / UnitTests

'ActiveInstruction.PossibleResults' is obsolete: 'Use the result objects in 'Results' property instead!'

Check warning on line 170 in src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

View workflow job for this annotation

GitHub Actions / IntegrationTests / IntegrationTests

'ActiveInstruction.PossibleResults' is obsolete: 'Use the result objects in 'Results' property instead!'
Results = resultObjects.ToArray(),
Inputs = inputs
}, instructionResponse => callback(EnumInstructionResult.ResultToEnumValue(attr.ResultEnum, instructionResponse.Result), instructionResponse.Inputs, activityStart));

Check warning on line 173 in src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

View workflow job for this annotation

GitHub Actions / Build / Build

'ActiveInstructionResponse.Result' is obsolete: 'Use result object from 'SelectedResult' instead'

Check warning on line 173 in src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

View workflow job for this annotation

GitHub Actions / UnitTests / UnitTests

'ActiveInstructionResponse.Result' is obsolete: 'Use result object from 'SelectedResult' instead'

Check warning on line 173 in src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

View workflow job for this annotation

GitHub Actions / IntegrationTests / IntegrationTests

'ActiveInstructionResponse.Result' is obsolete: 'Use result object from 'SelectedResult' instead'
}
Expand Down

0 comments on commit 0cce9f1

Please sign in to comment.