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); }
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; }
public Task Reply(object message, ReplyOptions options = null) { ReplyOptions replyOptions = GetOrCreateReplyOptions(incoming, options); return(bus.Send(message, replyOptions, incoming)); }
public Task Reply(object message, ReplyOptions options = null) { ReplyOptions replyOptions = GetOrCreateReplyOptions(incoming, options); return bus.Send(message, replyOptions, incoming); }