Class RequireGroupAttribute
- Namespace
- Signal.Application.Commands.Preconditions
- Assembly
- Signal.Application.dll
The command may only be used in group conversations.
public sealed class RequireGroupAttribute : PreconditionAttribute
- Inheritance
-
RequireGroupAttribute
- Inherited Members
Methods
CheckAsync(CommandContext, CancellationToken)
Checks whether the command may run.
public override ValueTask<PreconditionResult> CheckAsync(CommandContext context, CancellationToken cancellationToken)
Parameters
contextCommandContextThe command context.
cancellationTokenCancellationTokenCancelled when the host shuts down.
Returns
- ValueTask<PreconditionResult>
The check result.