Пример #1
0
        /// <inheritdoc />
        public async Task InvokeAsync(CommandResultContext context, CommandResultDelegate next)
        {
            var options = context?.CommandContext.CommandServices?.GetService <IOptions <MariCommandsOptions> >()?.Value;

            if (options.HasNoContent() || !options.AutoDisposeContext)
            {
                return;
            }

            await context.CommandContext.DisposeAsync();

            await next(context);
        }
Пример #2
0
            public Task InvokeAsync(CommandResultContext context, CommandResultDelegate next)
            {
                _singletonDependency.Invoked = true;

                return(next(context));
            }