/// <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); }
public Task InvokeAsync(CommandResultContext context, CommandResultDelegate next) { _singletonDependency.Invoked = true; return(next(context)); }