/// <summary> /// Instantiates a message of type T and performs a regular Reply. /// </summary> /// <typeparam name="T">The type of message, usually an interface.</typeparam> /// <param name="context">Object being extended.</param> /// <param name="messageConstructor">An action which initializes properties of the message.</param> public static Task Reply <T>(this IMessageProcessingContext context, Action <T> messageConstructor) { Guard.AgainstNull(nameof(context), context); Guard.AgainstNull(nameof(messageConstructor), messageConstructor); return(context.Reply(messageConstructor, new ReplyOptions())); }
/// <summary> /// Sends the message to the endpoint which sent the message currently being handled on this thread. /// </summary> /// <param name="context">Object being extended.</param> /// <param name="message">The message to send.</param> public static Task Reply(this IMessageProcessingContext context, object message) { Guard.AgainstNull(nameof(context), context); Guard.AgainstNull(nameof(message), message); return(context.Reply(message, new ReplyOptions())); }
public Task Handle(object message, IMessageProcessingContext context) { return(context.Reply(new Reply())); }
public async Task Handle(object message, IMessageProcessingContext context) { await context.Reply(new SagaDisappearedMessage()); }
public Task Handle(object message, IMessageProcessingContext context) { var sagaDisappearedMessage = new SagaDisappearedMessage(); return(context.Reply(sagaDisappearedMessage)); }
public Task Handle(object message, IMessageProcessingContext context) { var sagaDisappearedMessage = new SagaDisappearedMessage(); return context.Reply(sagaDisappearedMessage); }