Skip to content

Commit 1038031

Browse files
authored
Merge pull request #772 from PHOENIXCONTACT/refactor/deprecated
Removed deprecated code
2 parents 039f0f0 + b7780e5 commit 1038031

File tree

62 files changed

+96
-1806
lines changed

Some content is hidden

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

62 files changed

+96
-1806
lines changed

docs/migrations/v8_to_v10.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,19 @@ With MORYX 10, several changes have been made to the data model to improve perfo
4141
### Removal of ProductFileEntity
4242

4343
The `ProductFileEntity` has been removed from the data model as it was not utilized effectively. This change helps streamline the data structure and reduce unnecessary complexity.
44+
45+
## Rarely used features removed
46+
47+
These feature were infrequently used and has been removed to simplify the codebase.
48+
49+
- ExceptionPrinter: Used to print exceptions to different outputs. Use Exception.ToString() instead.
50+
- CrashHandler: Used to handle application crashes. This feature was used were the runtime was a console application.
51+
- Caller: Used to get information about the calling method. Use System.Diagnostics.StackTrace instead.
52+
- Moryx.Endpoints: This namespace contained all base classes for the time when an endpoint was hosted inside a module. Since we use controllers it is deprecated.
53+
- Moryx.Identity: This namespace contained base classes and services for the old WPF client to provide the authorization context. Since MORYX support web uis, this is deprecated
54+
- PortConfig: Used for old wcf services. Deprecated since ASP.NET Core.
55+
- ProxyConfig.Port: Use the full address instead. It contains also http/https, domain and port
56+
57+
## Moved classes and namespaces
58+
59+
- Moryx.Tools.FunctionResult: Moved to Moryx.Tools

src/Moryx.Analytics.Server/ModuleController/ModuleController.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System.ComponentModel;
55
using Microsoft.Extensions.Logging;
6-
using Moryx.Communication.Endpoints;
76
using Moryx.Configuration;
87
using Moryx.Container;
98
using Moryx.Runtime.Modules;
@@ -16,8 +15,6 @@ namespace Moryx.Analytics.Server.ModuleController
1615
[Description("Modul to analyze data and visualize in Dashboards")]
1716
public class ModuleController : ServerModuleBase<ModuleConfig>
1817
{
19-
private IEndpointHost _host;
20-
2118
/// <summary>
2219
/// The module's name.
2320
/// </summary>
@@ -51,8 +48,6 @@ protected override void OnStart()
5148
/// </summary>
5249
protected override void OnStop()
5350
{
54-
_host.Stop();
55-
_host = null;
5651
}
5752

5853
#endregion
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
5-
<Description>Extensions for the Integration of MORYX in ASP.NET Core</Description>
6-
<PackageTags>MORYX;ASP</PackageTags>
7-
<IsPackable>true</IsPackable>
8-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<Description>Extensions for the Integration of MORYX in ASP.NET Core</Description>
7+
<PackageTags>MORYX;ASP</PackageTags>
8+
<IsPackable>true</IsPackable>
9+
</PropertyGroup>
910

10-
<ItemGroup>
11-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
12-
</ItemGroup>
11+
<ItemGroup>
12+
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
13+
</ItemGroup>
1314

1415
</Project>

src/Moryx.Asp.Extensions/Exception/MoryxExceptionFilter.cs renamed to src/Moryx.Asp.Extensions/MoryxExceptionFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class MoryxExceptionFilter : IExceptionFilter
1212
public void OnException(ExceptionContext context)
1313
{
1414
context.HttpContext.Response.StatusCode = StatusCodes.Status500InternalServerError;
15-
string headers = string.Join(" \r\n ", context.HttpContext.Request.Headers.Select(h => $"{h.Key}: {h.Value}"));
15+
var headers = string.Join(" \r\n ", context.HttpContext.Request.Headers.Select(h => $"{h.Key}: {h.Value}"));
1616
context.Result = new ObjectResult(new MoryxExceptionResponse
1717
{
1818
Title = "500 - Internal Server Error",

src/Moryx.Asp.Extensions/Exception/MoryxExceptionResponse.cs renamed to src/Moryx.Asp.Extensions/MoryxExceptionResponse.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace Moryx.Asp.Extensions
66
public class MoryxExceptionResponse
77
{
88
public string Title { get; set; }
9+
910
public string Exception { get; set; }
1011
}
1112
}

src/Moryx.ControlSystem.ProcessEngine/ModuleController/ComponentOrchestration.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the Apache License, Version 2.0
33

44
using Microsoft.Extensions.Logging;
5-
using Moryx.Communication.Endpoints;
65
using Moryx.Container;
76
using Moryx.ControlSystem.Jobs;
87
using Moryx.ControlSystem.ProcessEngine.Jobs;
@@ -40,8 +39,6 @@ internal class ComponentOrchestration
4039

4140
public ISetupJobHandler SetupManager { get; set; }
4241

43-
public IEndpointHostFactory HostFactory { get; set; }
44-
4542
public IModuleLogger Logger { get; set; }
4643

4744
#endregion

src/Moryx.Drivers.OpcUa/DataValueResult.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Copyright (c) 2025, Phoenix Contact GmbH & Co. KG
22

3-
using System;
3+
using Moryx.Tools;
44
using Opc.Ua;
5-
using Moryx.Tools.FunctionResult;
65

76
namespace Moryx.Drivers.OpcUa;
87

src/Moryx.Drivers.OpcUa/DriverStates/DriverOpcUaState.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
// Copyright (c) 2025, Phoenix Contact GmbH & Co. KG
22
// Licensed under the Apache License, Version 2.0
33

4-
using System;
54
using Moryx.AbstractionLayer.Drivers;
65
using Moryx.StateMachines;
7-
using Moryx.Tools.FunctionResult;
8-
using Opc.Ua;
96
using Opc.Ua.Client;
107

118
namespace Moryx.Drivers.OpcUa.DriverStates;

src/Moryx.Media.Server/Endpoint/Models/FileDescriptorModel.cs renamed to src/Moryx.Media.Endpoints/Model/FileDescriptorModel.cs

File renamed without changes.

src/Moryx.Media.Server/Endpoint/Models/PreviewDescriptorModel.cs renamed to src/Moryx.Media.Endpoints/Model/PreviewDescriptorModel.cs

File renamed without changes.

0 commit comments

Comments
 (0)