Show / Hide Table of Contents

Class ArubaCommand

A command that can be performed given an IGameClient and a parameter string. This is not mutable, i.e. all properties must be specified through the constructor.

Inheritance
object
ArubaCommand
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.Internal.Studios.Aruba.Infrastructure
Assembly: Aruba.Infrastructure.dll
Syntax
public class ArubaCommand
Remarks

Initializes a new instance of the ArubaCommand class.

Constructors

View Source

ArubaCommand(string, string, bool, Func<IGameClient, string, bool>, Func<IGameClient, string, Task>)

A command that can be performed given an IGameClient and a parameter string. This is not mutable, i.e. all properties must be specified through the constructor.

Declaration
public ArubaCommand(string friendlyName, string description, bool requiresGameClient, Func<IGameClient, string, bool> canExecute, Func<IGameClient, string, Task> execute)
Parameters
Type Name Description
string friendlyName

The friendly name used to represent the command in the UI.

string description

The description of the command to show in the UI.

bool requiresGameClient

Whether this command requires a game client in order to execute.

Func<IGameClient, string, bool> canExecute

Whether the command can be executed.

Func<IGameClient, string, Task> execute

The task to execute the command.

Remarks

Initializes a new instance of the ArubaCommand class.

Properties

View Source

CanExecute

Gets a function used to check if the command can be executed.

Declaration
public Func<IGameClient, string, bool> CanExecute { get; }
Property Value
Type Description
Func<IGameClient, string, bool>
View Source

Description

Gets a description of the command to show in the UI.

Declaration
public string Description { get; }
Property Value
Type Description
string
View Source

Execute

Gets a Func<T, TResult> returning a Task used to execute this.

Declaration
public Func<IGameClient, string, Task> Execute { get; }
Property Value
Type Description
Func<IGameClient, string, Task>
View Source

FriendlyName

Gets a name that is used to represent the command in the UI.

Declaration
public string FriendlyName { get; }
Property Value
Type Description
string
View Source

RequiresGameClient

Gets a value indicating whether this command requires a game client. If no game client is required Aruba will not preemptively throw on null client when validating command can run.

Declaration
public bool RequiresGameClient { get; }
Property Value
Type Description
bool
  • View Source
In this article
Back to top Generated by DocFX