From d9c22825a3fb95d3d125bf1929d011c0af7cec07 Mon Sep 17 00:00:00 2001 From: Timothy Nunnink <46979634+tnunnink@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:16:37 -0500 Subject: [PATCH] Fixed bug with Rung comment/text element order. Couple other small clean up items. Adding CodeKey.cs as a potential idea to add to LogixCode at some point (maybe). --- src/.idea/.idea.L5Sharp/.idea/workspace.xml | 44 +++++------ src/L5Sharp.Core/Common/CodeKey.cs | 77 +++++++++++++++++++ src/L5Sharp.Core/Elements/Rung.cs | 2 +- src/L5Sharp.Core/L5Sharp.Core.csproj | 8 +- src/L5Sharp.Core/LogixComponent.cs | 3 +- src/L5Sharp.Core/LogixElement.cs | 44 +++++++++++ src/L5Sharp.Core/LogixType.cs | 2 +- tests/L5Sharp.Tests/Components/TagTests.cs | 21 ++++- ....New_Default_ShouldBeVerified.verified.xml | 3 + ...TextOverload_ShouldBeVerified.verified.xml | 3 + ...CommentThenText_ShouldBeValid.verified.xml | 4 + ...ent_DefaultRung_ShouldBeValid.verified.xml | 4 + ...entThenTextAgainShouldBeValid.verified.xml | 4 + tests/L5Sharp.Tests/Elements/RungTests.cs | 49 ++++++++++++ tests/L5Sharp.Tests/L5Sharp.Tests.csproj | 3 + 15 files changed, 235 insertions(+), 36 deletions(-) create mode 100644 src/L5Sharp.Core/Common/CodeKey.cs create mode 100644 tests/L5Sharp.Tests/Elements/RungTests.New_Default_ShouldBeVerified.verified.xml create mode 100644 tests/L5Sharp.Tests/Elements/RungTests.New_TextOverload_ShouldBeVerified.verified.xml create mode 100644 tests/L5Sharp.Tests/Elements/RungTests.SetCommentThenText_ShouldBeValid.verified.xml create mode 100644 tests/L5Sharp.Tests/Elements/RungTests.SetComment_DefaultRung_ShouldBeValid.verified.xml create mode 100644 tests/L5Sharp.Tests/Elements/RungTests.SetTextToNullThenCommentThenTextAgainShouldBeValid.verified.xml diff --git a/src/.idea/.idea.L5Sharp/.idea/workspace.xml b/src/.idea/.idea.L5Sharp/.idea/workspace.xml index 049bc682..560a757e 100644 --- a/src/.idea/.idea.L5Sharp/.idea/workspace.xml +++ b/src/.idea/.idea.L5Sharp/.idea/workspace.xml @@ -8,32 +8,21 @@