示例#1
0
    public void Invoke(IncomingContext context, Action next)
    {
        var handlerName = context.MessageHandler.Instance.GetType().Name;

        using (logger.StartTimer(handlerName))
        {
            next();
        }
    }
示例#2
0
    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);
        }
    }