public string Send(SendMessageRequest request)
        {
            if (request.MessageBody.Equals(FakeBatchItemFailString, StringComparison.OrdinalIgnoreCase))
            {
                return(null);
            }

            var newItem = new FakeSqsQueueItem
            {
                Body              = request.MessageBody,
                Status            = FakeSqsItemStatus.Queued,
                MessageAttributes = request.MessageAttributes,
            };

            qItems.Enqueue(newItem);

            return(newItem.MessageId);
        }
Esempio n. 2
0
        public string Send(SendMessageRequest request)
        {
            if (request.MessageBody.Equals(FakeBatchItemFailString, StringComparison.InvariantCultureIgnoreCase))
            {
                return null;
            }

            var newItem = new FakeSqsQueueItem
            {
                Body = request.MessageBody,
                Status = FakeSqsItemStatus.Queued
            };

            qItems.Enqueue(newItem);

            return newItem.MessageId;
        }