Skip to content

Commit f939dd1

Browse files
Feat/merge in system text json branch; fixes #262 (#354)
* [Replace] Newtonsoft.Json with System.Text.Json; fixes #262
1 parent 549bdf3 commit f939dd1

File tree

408 files changed

+114603
-18573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+114603
-18573
lines changed

CDP4-SDK.sln.DotSettings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
<copyright file="${File.FileName}" company="Starion Group S.A.">
247247
Copyright (c) 2015-${CurrentDate.Year} Starion Group S.A.
248248

249-
Author: Sam Gerené, Alex Vorobiev, Alexander van Delft, Nathanael Smiechowski, Antoine Théate, Omar Elebiary, Jaime Bernar
249+
Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Nathanael Smiechowski, Antoine Théate, Omar Elebiary, Jaime Bernar
250250

251251
This file is part of CDP4-COMET SDK Community Edition
252252


CDP4Common/CDP4Common.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFrameworks>net48;netstandard2.0</TargetFrameworks>
55
<Company>Starion Group S.A.</Company>
66
<Title>CDP4Common Community Edition</Title>
7-
<VersionPrefix>28.3.2</VersionPrefix>
7+
<VersionPrefix>29.0.0</VersionPrefix>
88
<Description>CDP4 Common Class Library that contains DTOs, POCOs</Description>
99
<Copyright>Copyright © Starion Group S.A.</Copyright>
1010
<Authors>Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael, Ahmed</Authors>
@@ -26,8 +26,7 @@
2626
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
2727
<LangVersion>latest</LangVersion>
2828
<PackageReleaseNotes>
29-
[Update] NLog
30-
[Add] SBOM
29+
[Refactor] Newtonsoft to System.Text.Json
3130
</PackageReleaseNotes>
3231
</PropertyGroup>
3332

CDP4Dal.NetCore.Tests/DAL/DalTestFixture.cs

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
// --------------------------------------------------------------------------------------------------------------------
1+
// -------------------------------------------------------------------------------------------------------------------------------
22
// <copyright file="DalTestFixture.cs" company="Starion Group S.A.">
33
// Copyright (c) 2015-2025 Starion Group S.A.
4-
//
5-
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft
6-
//
7-
// This file is part of CDP4-SDK Community Edition
8-
//
9-
// The CDP4-SDK Community Edition is free software; you can redistribute it and/or
4+
//
5+
// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Nathanael Smiechowski, Antoine Théate, Omar Elebiary, Jaime Bernar
6+
//
7+
// This file is part of CDP4-COMET SDK Community Edition
8+
//
9+
// The CDP4-COMET SDK Community Edition is free software; you can redistribute it and/or
1010
// modify it under the terms of the GNU Lesser General Public
1111
// License as published by the Free Software Foundation; either
1212
// version 3 of the License, or (at your option) any later version.
13-
//
14-
// The CDP4-SDK Community Edition is distributed in the hope that it will be useful,
13+
//
14+
// The CDP4-COMET SDK Community Edition is distributed in the hope that it will be useful,
1515
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1616
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1717
// Lesser General Public License for more details.
18-
//
18+
//
1919
// You should have received a copy of the GNU Lesser General Public License
2020
// along with this program; if not, write to the Free Software Foundation,
2121
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2222
// </copyright>
23-
// --------------------------------------------------------------------------------------------------------------------
23+
// -------------------------------------------------------------------------------------------------------------------------------
2424

2525
namespace CDP4Dal.Tests.DAL
2626
{
@@ -36,12 +36,13 @@ namespace CDP4Dal.Tests.DAL
3636
using CDP4Common.Helpers;
3737

3838
using CDP4Dal.Composition;
39+
using CDP4Dal.DAL;
3940
using CDP4Dal.Exceptions;
4041
using CDP4Dal.Operations;
41-
using CDP4Dal.DAL;
4242

43+
using CDP4DalCommon.Protocol.Operations;
44+
using CDP4DalCommon.Protocol.Tasks;
4345
using CDP4DalCommon.Authentication;
44-
using CDP4DalCommon.Tasks;
4546

4647
using NUnit.Framework;
4748

@@ -141,6 +142,7 @@ public void Verify_That_SetIterationId_Works_as_expected()
141142
var iteration = new Iteration();
142143
var elementDefinition = new ElementDefinition();
143144
var parameter = new Parameter();
145+
144146
var list = new List<Thing>
145147
{
146148
model,
@@ -304,7 +306,10 @@ public void Verify_that_OperationContainerFileVerification_throws_no_exception_w
304306
[CDPVersion("1.1.0")]
305307
internal class TestDal : Dal
306308
{
307-
public override bool IsReadOnly { get { return false; } }
309+
public override bool IsReadOnly
310+
{
311+
get { return false; }
312+
}
308313

309314
public TestDal(Credentials credentials)
310315
: base()
@@ -495,6 +500,7 @@ public override Task RequestAuthenticationTokenFromRefreshToken(CancellationToke
495500
internal class DecoratedDal : Dal
496501
{
497502
public override bool IsReadOnly { get; }
503+
498504
public override Task<IEnumerable<Thing>> Write(IEnumerable<OperationContainer> operationContainer, IEnumerable<string> files = null)
499505
{
500506
throw new NotImplementedException();
@@ -653,4 +659,4 @@ public override Task RequestAuthenticationTokenFromRefreshToken(CancellationToke
653659
throw new System.NotImplementedException();
654660
}
655661
}
656-
}
662+
}

CDP4Dal.NetCore.Tests/Operations/OperationContainerTestFixture.cs

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
1-
// --------------------------------------------------------------------------------------------------------------------
1+
// -------------------------------------------------------------------------------------------------------------------------------
22
// <copyright file="OperationContainerTestFixture.cs" company="Starion Group S.A.">
33
// Copyright (c) 2015-2025 Starion Group S.A.
4-
//
5-
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou
6-
//
7-
// This file is part of CDP4-SDK Community Edition
8-
//
9-
// The CDP4-SDK Community Edition is free software; you can redistribute it and/or
4+
//
5+
// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Nathanael Smiechowski, Antoine Théate, Omar Elebiary, Jaime Bernar
6+
//
7+
// This file is part of CDP4-COMET SDK Community Edition
8+
//
9+
// The CDP4-COMET SDK Community Edition is free software; you can redistribute it and/or
1010
// modify it under the terms of the GNU Lesser General Public
1111
// License as published by the Free Software Foundation; either
1212
// version 3 of the License, or (at your option) any later version.
13-
//
14-
// The CDP4-SDK Community Edition is distributed in the hope that it will be useful,
13+
//
14+
// The CDP4-COMET SDK Community Edition is distributed in the hope that it will be useful,
1515
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1616
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1717
// Lesser General Public License for more details.
18-
//
18+
//
1919
// You should have received a copy of the GNU Lesser General Public License
2020
// along with this program; if not, write to the Free Software Foundation,
2121
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2222
// </copyright>
23-
// --------------------------------------------------------------------------------------------------------------------
23+
// -------------------------------------------------------------------------------------------------------------------------------
2424

2525
namespace CDP4Dal.Tests
2626
{
2727
using System;
2828
using System.Linq;
2929

3030
using CDP4Common.CommonData;
31-
using CDP4Common.DTO;
31+
using CDP4Common.DTO;
32+
3233
using CDP4Dal.Operations;
34+
35+
using CDP4DalCommon.Protocol.Operations;
36+
3337
using NUnit.Framework;
34-
38+
3539
[TestFixture]
3640
public class OperationContainerTestFixture
3741
{
@@ -42,7 +46,7 @@ public class OperationContainerTestFixture
4246
[SetUp]
4347
public void SetUp()
4448
{
45-
this.siteDirectoryContext = "/SiteDirectory/47363f0d-eb6d-4a58-95f5-fa7854995650";
49+
this.siteDirectoryContext = "/SiteDirectory/47363f0d-eb6d-4a58-95f5-fa7854995650";
4650
this.iterationContext = "/EngineeringModel/5e5dc7f8-833d-4331-b421-eb2c64fcf64b/iteration/b58ea73d-350d-4520-b9d9-a52c75ac2b5d";
4751
}
4852

@@ -98,9 +102,9 @@ public void VerifyExecutionOfOperationAddAndRemove()
98102
var elementDefinition = new ElementDefinition(Guid.NewGuid(), 0);
99103
elementDefinition.PartialRoutes.Add("iteration/b58ea73d-350d-4520-b9d9-a52c75ac2b5d");
100104
elementDefinition.PartialRoutes.Add("EngineeringModel/5e5dc7f8-833d-4331-b421-eb2c64fcf64b");
101-
105+
102106
var clone = elementDefinition.DeepClone<ElementDefinition>();
103-
var operation = new Operation(elementDefinition, clone, OperationKind.Update);
107+
var operation = new Operation(elementDefinition, clone, OperationKind.Update);
104108

105109
var operationContainer = new OperationContainer(this.iterationContext);
106110

CDP4Dal.NetCore.Tests/Operations/OperationTestFixture.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
// --------------------------------------------------------------------------------------------------------------------
1+
// -------------------------------------------------------------------------------------------------------------------------------
22
// <copyright file="OperationTestFixture.cs" company="Starion Group S.A.">
33
// Copyright (c) 2015-2025 Starion Group S.A.
4-
//
5-
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou
6-
//
7-
// This file is part of CDP4-SDK Community Edition
8-
//
9-
// The CDP4-SDK Community Edition is free software; you can redistribute it and/or
4+
//
5+
// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Nathanael Smiechowski, Antoine Théate, Omar Elebiary, Jaime Bernar
6+
//
7+
// This file is part of CDP4-COMET SDK Community Edition
8+
//
9+
// The CDP4-COMET SDK Community Edition is free software; you can redistribute it and/or
1010
// modify it under the terms of the GNU Lesser General Public
1111
// License as published by the Free Software Foundation; either
1212
// version 3 of the License, or (at your option) any later version.
13-
//
14-
// The CDP4-SDK Community Edition is distributed in the hope that it will be useful,
13+
//
14+
// The CDP4-COMET SDK Community Edition is distributed in the hope that it will be useful,
1515
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1616
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1717
// Lesser General Public License for more details.
18-
//
18+
//
1919
// You should have received a copy of the GNU Lesser General Public License
2020
// along with this program; if not, write to the Free Software Foundation,
2121
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2222
// </copyright>
23-
// --------------------------------------------------------------------------------------------------------------------
23+
// -------------------------------------------------------------------------------------------------------------------------------
2424

2525
namespace CDP4Dal.Tests
2626
{
2727
using CDP4Common.DTO;
2828

29-
using CDP4Dal.Operations;
29+
using CDP4DalCommon.Protocol.Operations;
3030

3131
using NUnit.Framework;
3232

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
// --------------------------------------------------------------------------------------------------------------------
1+
// -------------------------------------------------------------------------------------------------------------------------------
22
// <copyright file="PostOperationTestFixture.cs" company="Starion Group S.A.">
33
// Copyright (c) 2015-2025 Starion Group S.A.
4-
//
5-
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou
6-
//
7-
// This file is part of CDP4-SDK Community Edition
8-
//
9-
// The CDP4-SDK Community Edition is free software; you can redistribute it and/or
4+
//
5+
// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Nathanael Smiechowski, Antoine Théate, Omar Elebiary, Jaime Bernar
6+
//
7+
// This file is part of CDP4-COMET SDK Community Edition
8+
//
9+
// The CDP4-COMET SDK Community Edition is free software; you can redistribute it and/or
1010
// modify it under the terms of the GNU Lesser General Public
1111
// License as published by the Free Software Foundation; either
1212
// version 3 of the License, or (at your option) any later version.
13-
//
14-
// The CDP4-SDK Community Edition is distributed in the hope that it will be useful,
13+
//
14+
// The CDP4-COMET SDK Community Edition is distributed in the hope that it will be useful,
1515
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1616
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1717
// Lesser General Public License for more details.
18-
//
18+
//
1919
// You should have received a copy of the GNU Lesser General Public License
2020
// along with this program; if not, write to the Free Software Foundation,
2121
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2222
// </copyright>
23-
// --------------------------------------------------------------------------------------------------------------------
23+
// -------------------------------------------------------------------------------------------------------------------------------
2424

2525
namespace CDP4Dal.Tests
2626
{
@@ -29,9 +29,9 @@ namespace CDP4Dal.Tests
2929
using CDP4Common;
3030
using CDP4Common.Dto;
3131
using CDP4Common.DTO;
32-
33-
using CDP4Dal.Operations;
34-
32+
33+
using CDP4DalCommon.Protocol.Operations;
34+
3535
using NUnit.Framework;
3636

3737
[TestFixture]
@@ -50,13 +50,5 @@ public void VerifyThatConstructorSetsLists()
5050

5151
internal class TestPostOperation : PostOperation
5252
{
53-
public override List<ClasslessDTO> Delete { get; set; }
54-
public override List<Thing> Create { get; set; }
55-
public override List<ClasslessDTO> Update { get; set; }
56-
public override List<CopyInfo> Copy { get; set; }
57-
public override void ConstructFromOperation(Operation operation)
58-
{
59-
throw new System.NotImplementedException();
60-
}
6153
}
6254
}

0 commit comments

Comments
 (0)