Esempio n. 1
0
        public async Task SendAsync(
            IKernelCommand command,
            KernelInvocationContext context)
        {
            EnsureMiddlewarePipelineIsInitialized();

            try
            {
                await _pipeline(command, context, (_, __) => Task.CompletedTask);
            }
            catch (Exception exception)
            {
                context.OnNext(
                    new CommandFailed(
                        exception,
                        command));
            }
        }