Commit 323b8dca474f774912a106ba93a78933dd5f395f
1 parent
f732e5c9
v1.17.1.0
- message queue sending template can be an xml structure
Showing
2 changed files
with
14 additions
and
3 deletions
Show diff stats
Vrh.Log4Pro.MaintenanceConsole/Manager - MSMQManager.cs
@@ -946,12 +946,23 @@ namespace Vrh.Log4Pro.MaintenanceConsole.MSMQManagerNS | @@ -946,12 +946,23 @@ namespace Vrh.Log4Pro.MaintenanceConsole.MSMQManagerNS | ||
946 | public List<string> Xml_QueueIdList; | 946 | public List<string> Xml_QueueIdList; |
947 | public MSMQMessageTemplate(XElement messagetemplatexml) | 947 | public MSMQMessageTemplate(XElement messagetemplatexml) |
948 | { | 948 | { |
949 | - Xml_TemplateString = GetValue(messagetemplatexml, ""); | 949 | + Xml_TemplateString = GetInnerText(messagetemplatexml,""); |
950 | if (string.IsNullOrWhiteSpace(Xml_TemplateString)) { isValid = false; return; } | 950 | if (string.IsNullOrWhiteSpace(Xml_TemplateString)) { isValid = false; return; } |
951 | Xml_QueueIdList = new List<string>(); | 951 | Xml_QueueIdList = new List<string>(); |
952 | var queueidlistcsvstring = GetValue(nameof(MSMQ.XmlStructure.MSMQManager.MessageTemplates.MessageTemplate.Attributes.QueueIdList), messagetemplatexml, MSMQ.XmlStructure.MSMQManager.MessageTemplates.MessageTemplate.Attributes.QueueIdList.Values.DEFAULT); | 952 | var queueidlistcsvstring = GetValue(nameof(MSMQ.XmlStructure.MSMQManager.MessageTemplates.MessageTemplate.Attributes.QueueIdList), messagetemplatexml, MSMQ.XmlStructure.MSMQManager.MessageTemplates.MessageTemplate.Attributes.QueueIdList.Values.DEFAULT); |
953 | if (!string.IsNullOrWhiteSpace(queueidlistcsvstring)) Xml_QueueIdList = queueidlistcsvstring.Split(new char[] { ',', ';' },StringSplitOptions.RemoveEmptyEntries).ToList(); | 953 | if (!string.IsNullOrWhiteSpace(queueidlistcsvstring)) Xml_QueueIdList = queueidlistcsvstring.Split(new char[] { ',', ';' },StringSplitOptions.RemoveEmptyEntries).ToList(); |
954 | } | 954 | } |
955 | + private string GetInnerText(XElement xe,string defaultvalue) | ||
956 | + { | ||
957 | + var node = xe?.FirstNode;if (node == null) return defaultvalue; | ||
958 | + string xetxt = ""; | ||
959 | + while (node != null) | ||
960 | + { | ||
961 | + xetxt += node.ToString(); | ||
962 | + node = node.NextNode; | ||
963 | + } | ||
964 | + return xetxt; | ||
965 | + } | ||
955 | } | 966 | } |
956 | public class MSMQDefaults : XmlLinqBase | 967 | public class MSMQDefaults : XmlLinqBase |
957 | { | 968 | { |
Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; | @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; | ||
32 | // You can specify all the values or you can default the Build and Revision Numbers | 32 | // You can specify all the values or you can default the Build and Revision Numbers |
33 | // by using the '*' as shown below: | 33 | // by using the '*' as shown below: |
34 | // [assembly: AssemblyVersion("1.0.*")] | 34 | // [assembly: AssemblyVersion("1.0.*")] |
35 | -[assembly: AssemblyVersion("1.17.0.0")] | ||
36 | -[assembly: AssemblyFileVersion("1.17.0.0")] | 35 | +[assembly: AssemblyVersion("1.17.1.0")] |
36 | +[assembly: AssemblyFileVersion("1.17.1.0")] |