Class Command<T>
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<T> : Command where T : IDeploymentItem
Type Parameters
Name | Description |
---|---|
T | Deployment Item Type |
Methods
ExecuteAsync(IEnumerable<IDeploymentItem>, CancellationToken)
Defines the method to be called when a command is invoked.
Declaration
public override sealed 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 |
Overrides
ExecuteAsync(IEnumerable<T>, CancellationToken)
Defines the method to be called when the command is invoked.
Declaration
public abstract Task ExecuteAsync(IEnumerable<T> items, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | items | The target items of the invocation. |
Cancellation |
cancellationToken | Cancellation token to cancel command invocation. |
Returns
Type | Description |
---|---|
Task | A task representing invocation result |
IsEnabled(IEnumerable<IDeploymentItem>)
The method to determine whether the command is enabled in the context menu.
Declaration
public override sealed 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 |
Overrides
IsEnabled(IEnumerable<T>)
Defines the method to be called when a command is invoked.
Declaration
public virtual bool IsEnabled(IEnumerable<T> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | items | The target items of the invocation. |
Returns
Type | Description |
---|---|
bool | A task representing the invocation result. |
IsVisible(IEnumerable<IDeploymentItem>)
The method to determine whether the command is visible in the context menu.
Declaration
public override sealed 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 |
Overrides
IsVisible(IEnumerable<T>)
The method to determine whether the command is visible in the context menu.
Declaration
public virtual bool IsVisible(IEnumerable<T> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | items | The target items of the invocation. |
Returns
Type | Description |
---|---|
bool | A bool representing the visibility status. |