예제 #1
0
파일: Bus.cs 프로젝트: sonbua/async-dolls
            static ReplyOptions GetOrCreateReplyOptions(TransportMessage incoming, ReplyOptions options = null)
            {
                Queue destination = incoming.ReplyTo;

                string correlationId = !string.IsNullOrEmpty(incoming.CorrelationId)
                    ? incoming.CorrelationId
                    : incoming.Id;

                if (options == null)
                {
                    return(new ReplyOptions(destination, correlationId));
                }

                options.Queue         = options.Queue ?? destination;
                options.CorrelationId = options.CorrelationId ?? correlationId;
                return(options);
            }
예제 #2
0
파일: Bus.cs 프로젝트: kjellski/async-dolls
            static ReplyOptions GetOrCreateReplyOptions(TransportMessage incoming, ReplyOptions options = null)
            {
                Queue destination = incoming.ReplyTo;

                string correlationId = !string.IsNullOrEmpty(incoming.CorrelationId)
                    ? incoming.CorrelationId
                    : incoming.Id;

                if (options == null)
                {
                    return new ReplyOptions(destination, correlationId);
                }

                options.Queue = options.Queue ?? destination;
                options.CorrelationId = options.CorrelationId ?? correlationId;
                return options;
            }
예제 #3
0
파일: Bus.cs 프로젝트: sonbua/async-dolls
            public Task Reply(object message, ReplyOptions options = null)
            {
                ReplyOptions replyOptions = GetOrCreateReplyOptions(incoming, options);

                return(bus.Send(message, replyOptions, incoming));
            }
예제 #4
0
파일: Bus.cs 프로젝트: kjellski/async-dolls
 public Task Reply(object message, ReplyOptions options = null)
 {
     ReplyOptions replyOptions = GetOrCreateReplyOptions(incoming, options);
     return bus.Send(message, replyOptions, incoming);
 }