Class Command
Represents a command to execute on a deployment item.
Inherited Members
Namespace: Unity.Services.DeploymentApi .Editor
Assembly: Unity.Services.DeploymentApi.dll
Syntax
public abstract class Command
Properties
Name
Represents command's name.
Declaration
public abstract string Name { get; }
Property Value
Type | Description |
---|---|
string |
Methods
ExecuteAsync(IEnumerable<IDeploymentItem>, CancellationToken)
Defines the method to be called when a command is invoked.
Declaration
public abstract Task ExecuteAsync(IEnumerable<IDeploymentItem> items, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IDeployment |
items | The target items of the invocation |
Cancellation |
cancellationToken | Cancellation token to cancel command invocation |
Returns
Type | Description |
---|---|
Task | A task representing the invocation result |
IsEnabled(IEnumerable<IDeploymentItem>)
The method to determine whether the command is enabled in the context menu.
Declaration
public virtual bool IsEnabled(IEnumerable<IDeploymentItem> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IDeployment |
items | The target items of the invocation |
Returns
Type | Description |
---|---|
bool | A bool representing the enablement status |
IsVisible(IEnumerable<IDeploymentItem>)
The method to determine whether the command is visible in the context menu.
Declaration
public virtual bool IsVisible(IEnumerable<IDeploymentItem> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IDeployment |
items | The target items of the invocation |
Returns
Type | Description |
---|---|
bool | A bool representing the visibility status |