diff --git a/CDP4Common.Tests/Helpers/ValueSetConverterTestFixture.cs b/CDP4Common.Tests/Helpers/ValueSetConverterTestFixture.cs index 01c203900..e422693f5 100644 --- a/CDP4Common.Tests/Helpers/ValueSetConverterTestFixture.cs +++ b/CDP4Common.Tests/Helpers/ValueSetConverterTestFixture.cs @@ -1,17 +1,17 @@ // -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2015-2020 RHEA System S.A. +// +// Copyright (c) 2015-2022 RHEA System S.A. // -// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft +// Author: Sam Gerené, Alex Vorobiev, Alexander van Delft, Nathanael Smiechowski, Antoine Théate, Omar Elebiary // -// This file is part of CDP4-SDK Community Edition +// This file is part of COMET-SDK Community Edition // -// The CDP4-SDK Community Edition is free software; you can redistribute it and/or +// The COMET-SDK Community Edition is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 3 of the License, or (at your option) any later version. // -// The CDP4-SDK Community Edition is distributed in the hope that it will be useful, +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. @@ -19,7 +19,6 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program; if not, write to the Free Software Foundation, // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// // -------------------------------------------------------------------------------------------------------------------- namespace CDP4Common.Tests.Helpers @@ -112,24 +111,37 @@ public void VerifyThatValueSetValuesAreCalculatedCorrectly(object value, string new object[] { " ", "-", "-", new SimpleQuantityKind()}, new object[] { true, "true", "true", new BooleanParameterType()}, new object[] { false, "false", "false", new BooleanParameterType()}, + new object[] { "True", "true", "true", new BooleanParameterType()}, + new object[] { "False", "false", "false", new BooleanParameterType()}, + new object[] { "True", "True", "True", new TextParameterType()}, + new object[] { "False", "False", "False", new TextParameterType()}, + new object[] { null, "-", "-", new TextParameterType()}, new object[] { "true", "true", "true", new TextParameterType()}, new object[] { "false", "false", "false", new TextParameterType()}, - new object[] { "True", "true", "true", new TextParameterType()}, - new object[] { "False", "false", "false", new TextParameterType()}, + new object[] { "0000001", "0000001", "0000001", new TextParameterType()}, + new object[] { "000.000,000", "000.000,000", "000.000,000", new TextParameterType()}, new object[] { 11.11F, "11.11", "11.11", new SimpleQuantityKind()}, new object[] { 11.11D, "11.11", "11.11", new SimpleQuantityKind()}, + new object[] { 11.11F, "11,11", "11.11", new TextParameterType()}, + new object[] { 11.11D, "11,11", "11.11", new TextParameterType()}, + new object[] { true, "True", "True", new TextParameterType()}, + new object[] { false, "False", "False", new TextParameterType()}, + new object[] { new EnumerationValueDefinition() {ShortName = "enumValue"}, "enumValue", "enumValue", new EnumerationParameterType()}, + new object[] { "SomeValue", "SomeValue", "SomeValue", new EnumerationParameterType()}, new object[] { new [] { new EnumerationValueDefinition {ShortName = "enumValue1"}, new EnumerationValueDefinition {ShortName = "enumValue2"} - }, $"enumValue1{Constants.PaddedMultiEnumSeparator}enumValue2", $"enumValue1{Constants.PaddedMultiEnumSeparator}enumValue2", new EnumerationParameterType() + }, + $"enumValue1{Constants.PaddedMultiEnumSeparator}enumValue2", $"enumValue1{Constants.PaddedMultiEnumSeparator}enumValue2", new EnumerationParameterType() }, new object[] { DateTime.ParseExact("2020-09-23T12:11:30", "yyyy-MM-ddTHH:mm:ss", null), "2020-09-23T12:11:30", "2020-09-23T12:11:30", new DateTimeParameterType()}, new object[] { DateTime.ParseExact("2020-09-23T12:11:30", "yyyy-MM-ddTHH:mm:ss", null), "2020-09-23", "2020-09-23", new DateParameterType()}, new object[] { DateTime.ParseExact("2020-09-23T12:11:30", "yyyy-MM-ddTHH:mm:ss", null), "12:11:30", "12:11:30", new TimeOfDayParameterType()}, + new object[] { "2020-09-23T12:11:30", "2020-09-23T12:11:30", "2020-09-23T12:11:30", new DateTimeParameterType()}, }; } } diff --git a/CDP4Common/CDP4Common.csproj b/CDP4Common/CDP4Common.csproj index 42ae9ab72..fd868e2d0 100644 --- a/CDP4Common/CDP4Common.csproj +++ b/CDP4Common/CDP4Common.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4Common Community Edition - 8.2.0 + 8.2.1 CDP4 Common Class Library that contains DTOs, POCOs Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael, Ahmed @@ -19,7 +19,7 @@ CDP COMET ECSS-E-TM-10-25 LGPL-3.0-only - [FIX] Beautify code based on SonarCube advice + [IMPROVE] TextParameterType implementationin ValueSetConverter diff --git a/CDP4Common/Helpers/ValueSetConverter.cs b/CDP4Common/Helpers/ValueSetConverter.cs index f4f5fa4b1..b55a0c23b 100644 --- a/CDP4Common/Helpers/ValueSetConverter.cs +++ b/CDP4Common/Helpers/ValueSetConverter.cs @@ -1,17 +1,17 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2020 RHEA System S.A. +// Copyright (c) 2015-2022 RHEA System S.A. // -// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft +// Author: Sam Gerené, Alex Vorobiev, Alexander van Delft, Nathanael Smiechowski, Antoine Théate, Omar Elebiary // -// This file is part of CDP4-SDK Community Edition +// This file is part of COMET-SDK Community Edition // -// The CDP4-SDK Community Edition is free software; you can redistribute it and/or +// The COMET-SDK Community Edition is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 3 of the License, or (at your option) any later version. // -// The CDP4-SDK Community Edition is distributed in the hope that it will be useful, +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. @@ -19,7 +19,6 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program; if not, write to the Free Software Foundation, // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// // -------------------------------------------------------------------------------------------------------------------- namespace CDP4Common.Helpers @@ -61,6 +60,11 @@ public static string ToValueSetString(this object value, ParameterType parameter return "-"; } + if (parameterType.ClassKind == ClassKind.TextParameterType) + { + return value.ToString(); + } + if (value is bool) { var booleanValue = Convert.ToBoolean(value); diff --git a/CDP4Dal/CDP4Dal.csproj b/CDP4Dal/CDP4Dal.csproj index 8a4536176..73c7d9be9 100644 --- a/CDP4Dal/CDP4Dal.csproj +++ b/CDP4Dal/CDP4Dal.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4Dal Community Edition - 8.1.0 + 8.1.1 CDP4 Data Access Layer library, a consumer of an ECSS-E-TM-10-25 Annex C API Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael, Ahmed @@ -19,7 +19,7 @@ CDP COMET ECSS-E-TM-10-25 LGPL-3.0-only - [Update] to CDP4Common 8.1.0 + [Update] to CDP4Common 8.2.1 diff --git a/CDP4JsonFileDal/CDP4JsonFileDal.csproj b/CDP4JsonFileDal/CDP4JsonFileDal.csproj index e08f70c47..8d65214c1 100644 --- a/CDP4JsonFileDal/CDP4JsonFileDal.csproj +++ b/CDP4JsonFileDal/CDP4JsonFileDal.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4JsonFileDal Community Edition - 8.1.0 + 8.1.1 CDP4 Json File Dal Plugin Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael @@ -19,7 +19,7 @@ CDP COMET ECSS-E-TM-10-25 LGPL-3.0-only - [FIX] Beautify code based on SonarCube advice + [Update] to CDP4Common 8.2.1 diff --git a/CDP4JsonSerializer/CDP4JsonSerializer.csproj b/CDP4JsonSerializer/CDP4JsonSerializer.csproj index 4e73d986f..9e1442798 100644 --- a/CDP4JsonSerializer/CDP4JsonSerializer.csproj +++ b/CDP4JsonSerializer/CDP4JsonSerializer.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4JsonSerializer Community Edition - 8.1.0 + 8.1.1 CDP4 JSON Serialization Library Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael @@ -19,10 +19,7 @@ CDP COMET ECSS-E-TM-10-25 JSON LGPL-3.0-only - Model version checks for - - Category.PermissibleClass - - PersonPermission - - ParticipantPermission + [Update] to CDP4Common 8.2.1 diff --git a/CDP4RequirementsVerification/CDP4RequirementsVerification.csproj b/CDP4RequirementsVerification/CDP4RequirementsVerification.csproj index 185fa788a..73375a379 100644 --- a/CDP4RequirementsVerification/CDP4RequirementsVerification.csproj +++ b/CDP4RequirementsVerification/CDP4RequirementsVerification.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4RequirementsVerification Community Edition - 1.13.0 + 1.13.1 CDP4 Class Library that provides requirement verification Copyright © RHEA System S.A. Sam, Alex, Alexander, Yevhen, Nathanael @@ -19,7 +19,7 @@ CDP COMET ECSS-E-TM-10-25 LGPL-3.0-only - [fix] Option dependent Requirement Verification on ElementUsage level + [Update] to CDP4Common 8.2.1 diff --git a/CDP4Rules/CDP4Rules.csproj b/CDP4Rules/CDP4Rules.csproj index a9ce7f3af..8612e44d7 100644 --- a/CDP4Rules/CDP4Rules.csproj +++ b/CDP4Rules/CDP4Rules.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4Rules Community Edition - 8.1.0 + 8.1.1 CDP4 Class Library that provides Model Analysis and Rule Checking Copyright © RHEA System S.A. Sam, Alex, Alexander, Yevhen, Nathanael @@ -19,7 +19,7 @@ CDP COMET ECSS-E-TM-10-25 LGPL-3.0-only - [FIX] Beautify code based on SonarCube advice + [Update] to CDP4Common 8.2.1 diff --git a/CDP4ServicesDal/CDP4ServicesDal.csproj b/CDP4ServicesDal/CDP4ServicesDal.csproj index afe37e01b..78d78392d 100644 --- a/CDP4ServicesDal/CDP4ServicesDal.csproj +++ b/CDP4ServicesDal/CDP4ServicesDal.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4ServicesDal Community Edition - 8.2.0 + 8.2.1 CDP4ServicesDal Dal Plugin Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael @@ -19,7 +19,7 @@ CDP COMET ECSS-E-TM-10-25 LGPL-3.0-only - [Update] to CDP4Common 8.1.0 + [Update] to CDP4Common 8.2.1 diff --git a/CDP4WspDal/CDP4WspDal.csproj b/CDP4WspDal/CDP4WspDal.csproj index 6a2d89844..ac783b67b 100644 --- a/CDP4WspDal/CDP4WspDal.csproj +++ b/CDP4WspDal/CDP4WspDal.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4WspDal Community Edition - 8.1.0 + 8.1.1 CDP4 WSP Dal Plugin Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael @@ -19,7 +19,7 @@ CDP COMET ECSS-E-TM-10-25 LGPL-3.0-only - [Update] to CDP4Common 8.1.0 + [Update] to CDP4Common 8.2.1