CommandResult constructor
constructor · CommandResult · cAlgo.API
DesktopCLICloud
Initialises a new instance of the CommandResult class.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Definition
public CommandResult(ControlBase child)
CommandResult(child: ControlBase)
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
child | ControlBase | ControlBase | The child control associated with the command result. |
Examples
var textBlock = new TextBlock { Text = "Command completed" };
var commandResult = new CommandResult(textBlock);
Print("Result has content: {0}", commandResult.Child != null);
textBlock = TextBlock()
textBlock.Text = "Command completed"
commandResult = CommandResult(textBlock)
api.Print(f"Result has content: {commandResult.Child is not None}")