| title |
AnonymousCommand Class |
| description |
The AnonymousCommand class is a command that can be invoked without being associated with a specific command palette item. |
| ms.date |
2/27/2025 |
| ms.topic |
reference |
| no-loc |
PowerToys |
Windows |
Insider |
|
Namespace: Microsoft.CommandPalette.Extensions.Toolkit
Inherits InvokableCommand
The AnonymousCommand class is a command that can be invoked without being associated with a specific command palette item. It is typically used for commands that do not require any parameters or additional context.
| Constructor |
Description |
| AnonymousCommand(Action) |
Initializes a new instance of the AnonymousCommand class with the specified action. |
| Property |
Type |
Description |
| Result |
ICommandResult |
Gets the result of the command execution. |
| Method |
Description |
| Invoke() |
Invokes the command. |