Skip to content

Commit

Permalink
build: Migrated DTO objects to a TwinGet.AutomationInterface.Dto pr…
Browse files Browse the repository at this point in the history
…oject

Updated all projects to .NET 8 for consistency.
  • Loading branch information
ahuca committed Dec 17, 2023
1 parent 0d2aa66 commit 308e53d
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 17 deletions.
11 changes: 9 additions & 2 deletions TwinGet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{BDB6B966-4
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TwinGet.AutomationInterface.Test", "test\TwinGet.AutomationInterface.Test\TwinGet.AutomationInterface.Test.csproj", "{0A952D6F-9D6D-45B0-8535-E10ED8029B6B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwinGet.Utils", "src\TwinGet.Utils\TwinGet.Utils.csproj", "{C29610F6-4B71-49AD-B57F-784467C1CF1F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TwinGet.Utils", "src\TwinGet.Utils\TwinGet.Utils.csproj", "{C29610F6-4B71-49AD-B57F-784467C1CF1F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwinGet.Utils.Test", "test\TwinGet.Utils.Test\TwinGet.Utils.Test.csproj", "{1D55596F-6184-4DA6-9DFE-BDB9B358EA4B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TwinGet.Utils.Test", "test\TwinGet.Utils.Test\TwinGet.Utils.Test.csproj", "{1D55596F-6184-4DA6-9DFE-BDB9B358EA4B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwinGet.AutomationInterface.Dto", "src\TwinGet.AutomationInterface.Dto\TwinGet.AutomationInterface.Dto\TwinGet.AutomationInterface.Dto.csproj", "{563081EB-AA78-4C47-8826-1DB5F1D724DE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -49,6 +51,10 @@ Global
{1D55596F-6184-4DA6-9DFE-BDB9B358EA4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D55596F-6184-4DA6-9DFE-BDB9B358EA4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D55596F-6184-4DA6-9DFE-BDB9B358EA4B}.Release|Any CPU.Build.0 = Release|Any CPU
{563081EB-AA78-4C47-8826-1DB5F1D724DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{563081EB-AA78-4C47-8826-1DB5F1D724DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{563081EB-AA78-4C47-8826-1DB5F1D724DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{563081EB-AA78-4C47-8826-1DB5F1D724DE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -60,6 +66,7 @@ Global
{0A952D6F-9D6D-45B0-8535-E10ED8029B6B} = {BDB6B966-4B82-4F51-9487-91CD520BC5AE}
{C29610F6-4B71-49AD-B57F-784467C1CF1F} = {46CA5D70-7812-4809-8B40-31392DE18AA1}
{1D55596F-6184-4DA6-9DFE-BDB9B358EA4B} = {BDB6B966-4B82-4F51-9487-91CD520BC5AE}
{563081EB-AA78-4C47-8826-1DB5F1D724DE} = {46CA5D70-7812-4809-8B40-31392DE18AA1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {42610935-EABE-41BA-A9A9-57FB7A657F65}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is licensed to you under MIT license.

namespace TwinGet.AutomationInterface.ProjectFileDeserialization
namespace TwinGet.AutomationInterface.Dto
{
/// <summary>
/// Every xml-serializeable object that models a TwinCAT project file should implement this interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Xml;
using System.Xml.Serialization;

namespace TwinGet.AutomationInterface.ProjectFileDeserialization
namespace TwinGet.AutomationInterface.Dto
{
[XmlRoot("Project", Namespace = "http://schemas.microsoft.com/developer/msbuild/2003")]
public class PlcProjectData : ITwincatProjectData
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TwinGet.AutomationInterface.Dto

A project containing of only data transfer objects (DTOs).
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Xml;
using System.Xml.Serialization;

namespace TwinGet.AutomationInterface.ProjectFileDeserialization
namespace TwinGet.AutomationInterface.Dto
{
[XmlRoot("TcSmProject")]
public class TcSmProjectData : ITwincatProjectData
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamesapce>TwinGet.AutomationInterface.Dto</RootNamesapce>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoWarn>CS8618</NoWarn>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion src/TwinGet.AutomationInterface/PlcProject.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file is licensed to you under MIT license.

using TCatSysManagerLib;
using TwinGet.AutomationInterface.Dto;
using TwinGet.AutomationInterface.Exceptions;
using TwinGet.AutomationInterface.ProjectFileDeserialization;
using TwinGet.AutomationInterface.Utils;

namespace TwinGet.AutomationInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TwinGet.AutomationInterface.Dto\TwinGet.AutomationInterface.Dto\TwinGet.AutomationInterface.Dto.csproj" />
<ProjectReference Include="..\TwinGet.Utils\TwinGet.Utils.csproj" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/TwinGet.AutomationInterface/TwincatProject.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file is licensed to you under MIT license.

using EnvDTE;
using TwinGet.AutomationInterface.Dto;
using TwinGet.AutomationInterface.Exceptions;
using TwinGet.AutomationInterface.ProjectFileDeserialization;
using TwinGet.AutomationInterface.Utils;
using ITcSysManagerAlias = TCatSysManagerLib.ITcSysManager15;

Expand Down
6 changes: 3 additions & 3 deletions src/TwinGet.AutomationInterface/Utils/TwincatUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

using Microsoft.Build.Construction;
using TCatSysManagerLib;
using TwinGet.AutomationInterface.Dto;
using TwinGet.AutomationInterface.Exceptions;
using TwinGet.AutomationInterface.ProjectFileDeserialization;
using ITcSmTreeItemAlias = TCatSysManagerLib.ITcSmTreeItem9;
using ITcSysManagerAlias = TCatSysManagerLib.ITcSysManager15;
using TwingetProjectElement = TwinGet.AutomationInterface.ProjectFileDeserialization.ProjectElement;
using TwingetProjectElement = TwinGet.AutomationInterface.Dto.ProjectElement;

namespace TwinGet.AutomationInterface.Utils
{
internal static class TwincatUtils
public static class TwincatUtils
{
public static ITcPlcIECProject3? LookUpPlcProject(this ITcSysManagerAlias systemManager, string name)
{
Expand Down
2 changes: 1 addition & 1 deletion src/TwinGet.Core/TwinGet.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<RootNamesapce>TwinGet.Core</RootNamesapce>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
Expand Down
2 changes: 1 addition & 1 deletion src/TwinGet.Utils/TwinGet.Utils.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is licensed to you under MIT license.

using System.Xml.Serialization;
using TwinGet.AutomationInterface.ProjectFileDeserialization;
using TwinGet.AutomationInterface.Dto;

namespace TwinGet.AutomationInterface.Test.ProjectFileDeserialization
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is licensed to you under MIT license.

using System.Xml.Serialization;
using TwinGet.AutomationInterface.ProjectFileDeserialization;
using TwinGet.AutomationInterface.Dto;

namespace TwinGet.AutomationInterface.Test.ProjectFileDeserialization
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file is licensed to you under MIT license.

using System.Xml.Serialization;
using TwinGet.AutomationInterface.Dto;
using TwinGet.AutomationInterface.Exceptions;
using TwinGet.AutomationInterface.ProjectFileDeserialization;

namespace TwinGet.AutomationInterface.Test.TestUtils
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file is licensed to you under MIT license.

using System.Xml.Serialization;
using TwinGet.AutomationInterface.Dto;
using TwinGet.AutomationInterface.Exceptions;
using TwinGet.AutomationInterface.ProjectFileDeserialization;

namespace TwinGet.AutomationInterface.Test.TestUtils
{
Expand Down
2 changes: 1 addition & 1 deletion test/TwinGet.Utils.Test/TwinGet.Utils.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down

0 comments on commit 308e53d

Please sign in to comment.