/// <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));
            }