public void Invoke(IncomingContext context, Action next)
    {
        next();
        var saga = context.MessageHandler.Instance as Saga;

        if (saga != null)
        {
            var instance = saga.Entity;
            logger.WriteSaga(instance);
        }
    }
    public override async Task Invoke(IInvokeHandlerContext context, Func <Task> next)
    {
        await next()
        .ConfigureAwait(false);

        if (context.Extensions.TryGet(out ActiveSagaInstance activeSagaInstance))
        {
            var instance = activeSagaInstance.Instance.Entity;
            logger.WriteSaga(instance);
        }
    }