CQRSalad.Dispatching.Interceptors.QueriesInterceptor.Execute C# (CSharp) Метод

Execute() защищенный статический Метод

protected static Execute ( DispatchingContext context, Task>.Func action ) : System.Threading.Tasks.Task
context CQRSalad.Dispatching.Context.DispatchingContext
action Task>.Func
Результат System.Threading.Tasks.Task
        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);
        }
    }