Class ContextMenuCheckBaseAttribute
The base class for a pre-execution check for a context menu.
Inheritance
System.Object
System.Attribute
ContextMenuCheckBaseAttribute
Namespace: DisCatSharp.ApplicationCommands
Assembly: DisCatSharp.ApplicationCommands.dll
Syntax
public abstract class ContextMenuCheckBaseAttribute : Attribute
Methods
| Improve this Doc View SourceExecuteChecksAsync(ContextMenuContext)
Checks whether this command can be executed within the current context.
Declaration
public abstract Task<bool> ExecuteChecksAsync(ContextMenuContext ctx)
Parameters
Type | Name | Description |
---|---|---|
ContextMenuContext | ctx | The context. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | Whether the checks passed. |