public void Invoke(IncomingContext context, Action next) { var handlerName = context.MessageHandler.Instance.GetType().Name; using (logger.StartTimer(handlerName)) { next(); } }
public override async Task Invoke(IInvokeHandlerContext context, Func <Task> next) { var handlerName = context.MessageHandler.Instance.GetType().Name; using (logger.StartTimer(handlerName)) { await next() .ConfigureAwait(false); } }