From aae4c3773e3af4ee25b2ead0d63bd63f3fc7fb52 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 6 Aug 2025 18:27:33 +0200 Subject: [PATCH] test update componenti nuget --- Lux.API/Controllers/GenericController.cs | 9 ++------- Lux.API/Controllers/WindowController.cs | 5 +++-- Lux.API/Services/ExternalMessageProcessor.cs | 3 ++- Lux.API/Services/RedisSubscriberService.cs | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Lux.API/Controllers/GenericController.cs b/Lux.API/Controllers/GenericController.cs index 67140b99..2ea38ffa 100644 --- a/Lux.API/Controllers/GenericController.cs +++ b/Lux.API/Controllers/GenericController.cs @@ -1,5 +1,6 @@ using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data.Services; +using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Mvc; using NLog; using System.Diagnostics; @@ -24,7 +25,6 @@ namespace Lux.API.Controllers #region Public Methods - /// /// Chiamata POST: specificando il tipo di richiesta + dizionario parametri esegue chiamata /// PUT: api/generic/calc/00000000-0000-0000-0000-000000000000 @@ -59,7 +59,7 @@ namespace Lux.API.Controllers } int nId = 1; // da modificare con tipo richiesta... - EgwMultiEngineManager.Data.QuestionDTO currArgs = new EgwMultiEngineManager.Data.QuestionDTO(nId, currReq.EnvType, DictExec); + QuestionDTO currArgs = new QuestionDTO(nId, currReq.EnvType, DictExec); await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); svgContent = "DONE"; @@ -78,11 +78,6 @@ namespace Lux.API.Controllers private readonly string pubChannel = ""; private IConfiguration _config; - /// - /// Demorichiesta jwd x fare test richiesta calcolo - /// - private string demoJwd = "{\r\n\"ProfilePath\":\"Profilo78\",\r\n\"AreaList\":[\r\n{\r\n\"Shape\":\"RECTANGLE\",\r\n\"DimensionList\":[\r\n{\r\n\"nIndex\":1,\r\n\"sName\":\"Width\",\r\n\"dValue\":1200.0\r\n},\r\n{\r\n\"nIndex\":2,\r\n\"sName\":\"Height\",\r\n\"dValue\":1500.0\r\n}\r\n],\r\n\"JointList\":[\r\n{\r\n\"nIndex\":1,\r\n\"JointType\":\"FULL_V\"\r\n},\r\n{\r\n\"nIndex\":2,\r\n\"JointType\":\"FULL_V\"\r\n},\r\n{\r\n\"nIndex\":3,\r\n\"JointType\":\"FULL_V\"\r\n},\r\n{\r\n\"nIndex\":4,\r\n\"JointType\":\"FULL_V\"\r\n}\r\n],\r\n\"BottomRail\":false,\r\n\"BottomRailQty\":0,\r\n\"AreaList\":[\r\n{\r\n\"bIsSashVertical\":true,\r\n\"SashList\":[\r\n{\r\n\"OpeningType\":\"TURNONLY_LEFT\",\r\n\"bHasHandle\":false,\r\n\"dDimension\":50.0\r\n},\r\n{\r\n\"OpeningType\":\"TILTTURN_RIGHT\",\r\n\"bHasHandle\":true,\r\n\"dDimension\":50.0\r\n}\r\n],\r\n\"SashType\":\"NULL\",\r\n\"JointList\":[\r\n{\r\n\"nIndex\":1,\r\n\"JointType\":\"FULL_V\"\r\n},\r\n{\r\n\"nIndex\":2,\r\n\"JointType\":\"FULL_V\"\r\n},\r\n{\r\n\"nIndex\":3,\r\n\"JointType\":\"FULL_V\"\r\n},\r\n{\r\n\"nIndex\":4,\r\n\"JointType\":\"FULL_V\"\r\n}\r\n],\r\n\"Hardware\":\"000000\",\r\n\"AreaList\":[\r\n{\r\n\"AreaList\":[\r\n{\r\n\"FillType\":\"GLASS\",\r\n\"AreaList\":[],\r\n\"AreaType\":\"FILL\"\r\n}\r\n],\r\n\"AreaType\":\"SPLITTED\"\r\n},\r\n{\r\n\"AreaList\":[\r\n{\r\n\"FillType\":\"GLASS\",\r\n\"AreaList\":[],\r\n\"AreaType\":\"FILL\"\r\n}\r\n],\r\n\"AreaType\":\"SPLITTED\"\r\n}\r\n],\r\n\"AreaType\":\"SASH\"\r\n}\r\n],\r\n\"AreaType\":\"FRAME\"\r\n}\r\n]\r\n}"; - #endregion Private Fields #region Private Properties diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs index a1311081..7335da69 100644 --- a/Lux.API/Controllers/WindowController.cs +++ b/Lux.API/Controllers/WindowController.cs @@ -1,4 +1,5 @@ using EgwCoreLib.Lux.Data.Services; +using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Mvc; using NLog; using System.Diagnostics; @@ -62,7 +63,7 @@ namespace Lux.API.Controllers DictExec.Add("Jwd", currJwd); int nId = 1; // da modificare con tipo richiesta... - EgwMultiEngineManager.Data.QuestionDTO currArgs = new EgwMultiEngineManager.Data.QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); + QuestionDTO currArgs = new QuestionDTO(nId, Constants.EXECENVIRONMENTS.WINDOW, DictExec); await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); svgContent = "DONE"; @@ -158,7 +159,7 @@ namespace Lux.API.Controllers DictExec.Add("Jwd", currJwd); int nId = 1; // da modificare con tipo richiesta... - EgwMultiEngineManager.Data.QuestionDTO currArgs = new EgwMultiEngineManager.Data.QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); + QuestionDTO currArgs = new QuestionDTO(nId, Constants.EXECENVIRONMENTS.WINDOW, DictExec); await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); svgContent = "DONE"; diff --git a/Lux.API/Services/ExternalMessageProcessor.cs b/Lux.API/Services/ExternalMessageProcessor.cs index 119df3f2..f80928bb 100644 --- a/Lux.API/Services/ExternalMessageProcessor.cs +++ b/Lux.API/Services/ExternalMessageProcessor.cs @@ -4,6 +4,7 @@ using Newtonsoft.Json; using NLog; using StackExchange.Redis; using System.Diagnostics; +using EgwMultiEngineManager.Data; namespace Lux.API.Services { @@ -31,7 +32,7 @@ namespace Lux.API.Services { try { - var retData = JsonConvert.DeserializeObject(rawData); + var retData = JsonConvert.DeserializeObject(rawData); if (retData != null) { if (retData.Args != null && retData.Args.Count > 0) diff --git a/Lux.API/Services/RedisSubscriberService.cs b/Lux.API/Services/RedisSubscriberService.cs index f85425a6..c4baac4f 100644 --- a/Lux.API/Services/RedisSubscriberService.cs +++ b/Lux.API/Services/RedisSubscriberService.cs @@ -23,7 +23,7 @@ namespace Lux.API.Services { _subManager.Subscribe(subChannel, async (ch, msg) => { - await _processor.HandleResultMessageAsync(ch, msg); + await _processor.HandleResultMessageAsync($"{ch}", $"{msg}"); }); return Task.CompletedTask;