コード例 #1
0
        public void Send(IConfigureSendContext context)
        {
            var envelope = new CloudQueueMessageEnvelope().
                SetFrom(context.From).
                SetTo(context.To).
                SetMessageId(context.MessageId).
                SetRelatesToMessageId(context.RelatesToMessageId).
                SetCorrelationId(context.CorrelationId).
                SetContentType(Resolver.GetContentType(context.Message)).
                SetContent(SerializeMessage(context)).
                SetTime(DateTimeOffset.UtcNow);

            InnerSender.Send(envelope);
        }
コード例 #2
0
 void Publish(IConfigureSendContext context, string address)
 {
     Sender.Send(
         context.
             SetFrom(Configuration.SenderConfiguration.FromQueue).
             SetTo(address).
             SetCorrelationId(SerialGuid.NewGuid()));
 }