Class Run
Namespace: Unity.Simulation.Client
Syntax
public class Run
Fields
appParameters
Map of currently uploaded app parameters for this run.
Declaration
public Dictionary<string, AppParam> appParameters
Field Value
Type | Description |
---|---|
Dictionary<String, AppParam> |
Properties
buildLocation
Set/Get the build location for this run.
Declaration
public string buildLocation { get; set; }
Property Value
Type | Description |
---|---|
String |
completed
Returns true when all instances have completed. Note that completed and success are not the same thing.
Declaration
public bool completed { get; protected set; }
Property Value
Type | Description |
---|---|
Boolean |
definitionId
Returns the run definition id.
Declaration
public string definitionId { get; protected set; }
Property Value
Type | Description |
---|---|
String |
executionId
Returns the run execution id.
Declaration
public string executionId { get; protected set; }
Property Value
Type | Description |
---|---|
String |
instances
Returns the total number of instances for this run.
Declaration
public int instances { get; protected set; }
Property Value
Type | Description |
---|---|
Int32 |
summary
Returns the run summary for this run. When a run is executing, it will periodically update the run summary. When this occurs is not guaranteed until after completion.
Declaration
public RunSummary summary { get; protected set; }
Property Value
Type | Description |
---|---|
RunSummary |
Methods
Create(String, String, String)
Create a new run definition.
Declaration
public static Run Create(string name = null, string description = null, string accessToken = null)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name for this run. |
String | description | Description text for this run. |
String | accessToken |
Returns
Type | Description |
---|---|
Run |
CreateFromDefinitionId(String, String)
Create a run definition instance from a previously uploaded run definition.
Declaration
public static Run CreateFromDefinitionId(string definitionId, string accessToken = null)
Parameters
Type | Name | Description |
---|---|---|
String | definitionId | The run definition id returned from a previous upload. |
String | accessToken |
Returns
Type | Description |
---|---|
Run |
CreateFromExecutionId(String, String)
Create a run definition instance from a previously uploaded run execution.
Declaration
public static Run CreateFromExecutionId(string executionId, string accessToken = null)
Parameters
Type | Name | Description |
---|---|---|
String | executionId | The run execution id returned from a previous run. |
String | accessToken |
Returns
Type | Description |
---|---|
Run |
Execute(String)
Executes this run definition.
Declaration
public void Execute(string accessToken = null)
Parameters
Type | Name | Description |
---|---|---|
String | accessToken |
GetAppParam<T>(String, String)
Get a previously added app param.
Declaration
public T GetAppParam<T>(string name, string accessToken = null)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of previously added app param. |
String | accessToken |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetPlayerLog(Int32, String)
Retrieves the player log for a specific instance.
Declaration
public string[] GetPlayerLog(int instance = 1, string accessToken = null)
Parameters
Type | Name | Description |
---|---|---|
Int32 | instance | The instance whose player log you wish to retrieve. Defaults to 1. |
String | accessToken |
Returns
Type | Description |
---|---|
String[] |
SetAppParam(String, String, Int32, String)
Add an app param to be uploaded..
Declaration
public string SetAppParam(string name, string param, int numInstances, string accessToken = null)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name for the app param. |
String | param | Json string appParam to be uploaded. |
Int32 | numInstances | The number of instances to use this app param. |
String | accessToken |
Returns
Type | Description |
---|---|
String |
SetAppParam<T>(String, T, Int32, String)
Add an app param to be uploaded. Struct T will be converted to JSON.
Declaration
public string SetAppParam<T>(string name, T param, int numInstances, string accessToken = null)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name for the app param. |
T | param | Struct value to be converted to JSON and uploaded. |
Int32 | numInstances | The number of instances to use this app param. |
String | accessToken |
Returns
Type | Description |
---|---|
String |
Type Parameters
Name | Description |
---|---|
T |
SetBuildId(String)
Sets the build id of a previously uploaded build.
Declaration
public void SetBuildId(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | The id of a previously uploaded build. |
SetBuildLocation(String)
Sets the build location that will be uploaded.
Declaration
public void SetBuildLocation(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path to the zipped up build to be uploaded. |
SetSysParam(SysParamDefinition)
Set the sys parameter to be used for this run.
Declaration
public void SetSysParam(SysParamDefinition sysParam)
Parameters
Type | Name | Description |
---|---|---|
SysParamDefinition | sysParam | The sys param selected from GetSysParam. |
Events
runCompleted
Event to receive notification when a run completes.
Declaration
public event Run.RunCompletedDelegate runCompleted
Event Type
Type | Description |
---|---|
Run.RunCompletedDelegate |