@@ -16,7 +16,7 @@ namespace GeneXus.Messaging.Queue
1616 public class AWSQueue : QueueBase , IQueue
1717 {
1818
19- public static String Name = "AWSSQS" ;
19+ public static string Name = "AWSSQS" ;
2020 const string ACCESS_KEY = "ACCESS_KEY" ;
2121 const string SECRET_ACCESS_KEY = "SECRET_KEY" ;
2222 const string REGION = "REGION" ;
@@ -313,13 +313,14 @@ private MessageQueueResult SetupMessageQueueResult(SendMessageResponse response)
313313 messageQueueResult . MessageId = response . MessageId ;
314314 messageQueueResult . MessageStatus = MessageQueueResultStatus . Sent ;
315315
316- messageQueueResult . MessageAttributes = new GXProperties ( ) ;
317-
318- messageQueueResult . MessageAttributes . Add ( "MD5OfMessageSystemAttributes" , response . MD5OfMessageSystemAttributes ) ;
319- messageQueueResult . MessageAttributes . Add ( "MD5OfMessageAttributes" , response . MD5OfMessageAttributes ) ;
320- messageQueueResult . MessageAttributes . Add ( "ContentLength" , response . ContentLength . ToString ( ) ) ;
321- messageQueueResult . MessageAttributes . Add ( "MD5OfMessageBody" , response . MD5OfMessageBody ) ;
322- messageQueueResult . MessageAttributes . Add ( "SequenceNumber" , response . SequenceNumber ) ;
316+ messageQueueResult . MessageAttributes = new GXProperties
317+ {
318+ { "MD5OfMessageSystemAttributes" , response . MD5OfMessageSystemAttributes } ,
319+ { "MD5OfMessageAttributes" , response . MD5OfMessageAttributes } ,
320+ { "ContentLength" , response . ContentLength . ToString ( ) } ,
321+ { "MD5OfMessageBody" , response . MD5OfMessageBody } ,
322+ { "SequenceNumber" , response . SequenceNumber }
323+ } ;
323324
324325 Type t = response . ResponseMetadata . GetType ( ) ;
325326 PropertyInfo [ ] props = t . GetProperties ( ) ;
@@ -342,12 +343,13 @@ private MessageQueueResult SetupMessageQueueResult(SendMessageBatchResultEntry r
342343 messageQueueResult . MessageId = response . Id ;
343344 messageQueueResult . MessageStatus = MessageQueueResultStatus . Sent ;
344345
345- messageQueueResult . MessageAttributes = new GXProperties ( ) ;
346-
347- messageQueueResult . MessageAttributes . Add ( "MD5OfMessageSystemAttributes" , response . MD5OfMessageSystemAttributes ) ;
348- messageQueueResult . MessageAttributes . Add ( "MD5OfMessageAttributes" , response . MD5OfMessageAttributes ) ;
349- messageQueueResult . MessageAttributes . Add ( "MD5OfMessageBody" , response . MD5OfMessageBody ) ;
350- messageQueueResult . MessageAttributes . Add ( "SequenceNumber" , response . SequenceNumber ) ;
346+ messageQueueResult . MessageAttributes = new GXProperties
347+ {
348+ { "MD5OfMessageSystemAttributes" , response . MD5OfMessageSystemAttributes } ,
349+ { "MD5OfMessageAttributes" , response . MD5OfMessageAttributes } ,
350+ { "MD5OfMessageBody" , response . MD5OfMessageBody } ,
351+ { "SequenceNumber" , response . SequenceNumber }
352+ } ;
351353 return messageQueueResult ;
352354 }
353355
@@ -378,11 +380,12 @@ private SimpleQueueMessage SetupSimpleQueueMessage(Message response)
378380 simpleQueueMessage . MessageBody = response . Body ;
379381 simpleQueueMessage . MessageHandleId = response . ReceiptHandle ;
380382
381- simpleQueueMessage . MessageAttributes = new GXProperties ( ) ;
382-
383- simpleQueueMessage . MessageAttributes . Add ( "MD5OfMessageAttributes" , response . MD5OfMessageAttributes ) ;
384- simpleQueueMessage . MessageAttributes . Add ( "MD5OfBody" , response . MD5OfBody ) ;
385-
383+ simpleQueueMessage . MessageAttributes = new GXProperties
384+ {
385+ { "MD5OfMessageAttributes" , response . MD5OfMessageAttributes } ,
386+ { "MD5OfBody" , response . MD5OfBody }
387+ } ;
388+
386389 foreach ( var messageAttribute in response . MessageAttributes )
387390 {
388391 MessageAttributeValue messageAttributeValue = messageAttribute . Value ;
0 commit comments