From 323b8dca474f774912a106ba93a78933dd5f395f Mon Sep 17 00:00:00 2001 From: Schwirg László Date: Fri, 2 Dec 2022 18:24:55 +0100 Subject: [PATCH] v1.17.1.0 - message queue sending template can be an xml structure --- Vrh.Log4Pro.MaintenanceConsole/Manager - MSMQManager.cs | 13 ++++++++++++- Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Vrh.Log4Pro.MaintenanceConsole/Manager - MSMQManager.cs b/Vrh.Log4Pro.MaintenanceConsole/Manager - MSMQManager.cs index c68e62f..c678655 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Manager - MSMQManager.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Manager - MSMQManager.cs @@ -946,12 +946,23 @@ namespace Vrh.Log4Pro.MaintenanceConsole.MSMQManagerNS public List Xml_QueueIdList; public MSMQMessageTemplate(XElement messagetemplatexml) { - Xml_TemplateString = GetValue(messagetemplatexml, ""); + Xml_TemplateString = GetInnerText(messagetemplatexml,""); if (string.IsNullOrWhiteSpace(Xml_TemplateString)) { isValid = false; return; } Xml_QueueIdList = new List(); var queueidlistcsvstring = GetValue(nameof(MSMQ.XmlStructure.MSMQManager.MessageTemplates.MessageTemplate.Attributes.QueueIdList), messagetemplatexml, MSMQ.XmlStructure.MSMQManager.MessageTemplates.MessageTemplate.Attributes.QueueIdList.Values.DEFAULT); if (!string.IsNullOrWhiteSpace(queueidlistcsvstring)) Xml_QueueIdList = queueidlistcsvstring.Split(new char[] { ',', ';' },StringSplitOptions.RemoveEmptyEntries).ToList(); } + private string GetInnerText(XElement xe,string defaultvalue) + { + var node = xe?.FirstNode;if (node == null) return defaultvalue; + string xetxt = ""; + while (node != null) + { + xetxt += node.ToString(); + node = node.NextNode; + } + return xetxt; + } } public class MSMQDefaults : XmlLinqBase { diff --git a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs index e8255f4..39e6d99 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.17.0.0")] -[assembly: AssemblyFileVersion("1.17.0.0")] +[assembly: AssemblyVersion("1.17.1.0")] +[assembly: AssemblyFileVersion("1.17.1.0")] -- libgit2 0.21.2