From c918860bbc99820627a7bae5a99a343a11018ec4 Mon Sep 17 00:00:00 2001 From: sjuarezgx Date: Fri, 12 Aug 2022 14:10:15 -0300 Subject: [PATCH] Fix assembly name to load SDT definitions --- .../Messaging/GXQueue/SimpleMessageQueue.cs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/dotnet/src/dotnetcore/Providers/Messaging/GXQueue/SimpleMessageQueue.cs b/dotnet/src/dotnetcore/Providers/Messaging/GXQueue/SimpleMessageQueue.cs index 6876482d9..e243ca161 100644 --- a/dotnet/src/dotnetcore/Providers/Messaging/GXQueue/SimpleMessageQueue.cs +++ b/dotnet/src/dotnetcore/Providers/Messaging/GXQueue/SimpleMessageQueue.cs @@ -21,7 +21,7 @@ public class SimpleMessageQueue private const string SDT_MESSAGEPROPERTY_CLASS_NAME = @"SdtMessageProperty"; private const string SDT_MESSAGERESULT_CLASS_NAME = @"SdtMessageResult"; private const string NAMESPACE = @"GeneXus.Programs.genexusmessagingqueue.simplequeue"; - private const string GENEXUS_COMMON_DLL = @"GeneXus.Programs.Common.dll"; + private const string MODULE_DLL = @"GeneXusMessagingQueue"; public SimpleMessageQueue() { @@ -228,9 +228,7 @@ private static void LoadAssemblyIfRequired() { if (assembly == null) { - assembly = LoadAssembly(Path.Combine(GxContext.StaticPhysicalPath(), GENEXUS_COMMON_DLL)); - if (assembly == null) - assembly = LoadAssembly(Path.Combine(GxContext.StaticPhysicalPath(), "bin", GENEXUS_COMMON_DLL)); + assembly = AssemblyLoader.LoadAssembly(new AssemblyName(MODULE_DLL)); } } @@ -326,16 +324,6 @@ private GxUserType TransformMessageQueueResult(MessageQueueResult messageQueueRe return messageResultSDT; } return null; - } - private static Assembly LoadAssembly(string fileName) - { - if (File.Exists(fileName)) - { - Assembly assemblyLoaded = Assembly.LoadFrom(fileName); - return assemblyLoaded; - } - else - return null; } public GxUserType SendMessage(GxUserType simpleQueueMessage, out GXBaseCollection errorMessages, out bool success) {