public static HandlerInvocationOptions Create(HandlerInvocationOptions options = null) { return(new HandlerInvocationOptions { HandlerArgsFunc = options?.HandlerArgsFunc ?? (context => new[] { context.GetMessage() }), PostInvokeAction = options?.PostInvokeAction ?? ((context, task) => { if (task is Ack ack) { context.Properties.TryAdd(RespondKey.ResponseMessage, ack.Response); } }) });
public HandlerInvocationMiddleware(HandlerInvocationOptions options = null) : base(options) { }