public Task Send(object message, SendOptions options = null) { return this.unit.Send(message, options); }
private Task Send(object message, SendOptions options, TransportMessage incoming) { if (message == null) { throw new ArgumentNullException("message", "You cannot send null"); } var sendOptions = options ?? new SendOptions(); LogicalMessage msg = this.factory.Create(message, sendOptions.Headers); return this.SendMessage(msg, sendOptions, incoming); }
private Task SendLocal(object message, SendOptions sendOptions, TransportMessage incoming) { sendOptions.Queue = this.readOnlyConfiguration.EndpointQueue; return this.Send(message, sendOptions, incoming); }
public Task Send(object message, SendOptions options = null) { return this.Send(message, options, incoming: null); }
private static void AddCustomHeaders(SendOptions sendOptions, TransportMessage incoming) { foreach (var keyvalue in incoming.Headers) { if (!HeaderKeys.IsKey(keyvalue.Key)) { sendOptions.Headers.Add(keyvalue.Key, keyvalue.Value); } } }
private static SendOptions CreatePostponeSendOptions(DateTime scheduledEnqueueTimeUtc, TransportMessage incoming) { var options = new SendOptions { CorrelationId = incoming.CorrelationId, ScheduledEnqueueTimeUtc = scheduledEnqueueTimeUtc, ReplyToAddress = incoming.ReplyTo }; AddCustomHeaders(options, incoming); return options; }