Beispiel #1
0
 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);
             }
         })
     });
Beispiel #2
0
 public HandlerInvocationMiddleware(HandlerInvocationOptions options = null)
     : base(options)
 {
 }