protected static async Task Execute(DispatchingContext context, Func<object, Task> action)
{
await context.With(c => c.MessageInstance)
.If(
message =>
message.GetType()
.GetInterfaces()
.Any(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(IQueryFor<>)))
.Do(action);
}
}