Table of Contents

Class JobVariableCollection

Namespace
ArcanaDevelopment.adTempus.Client.Collections
Assembly
ArcanaDevelopment.adTempus.Client.dll

A collection of JobVariables.

public sealed class JobVariableCollection : ADTObjectCollectionT<JobVariable>
Inheritance
object
JobVariableCollection

Constructors

JobVariableCollection()

public JobVariableCollection()

Methods

Add(JobVariable)

Adds a variable to the collection.

public override void Add(JobVariable newVal)

Parameters

NameTypeDescription
newVal JobVariable

The variable to add. The Name must be unique.

Exceptions

DuplicateItemException

Thrown if the collection already contains a variable with the same Name.

Add(JobVariable, bool, bool)

Adds a variable to the collection or replaces the existing variable with the same Name.

public void Add(JobVariable newVal, bool replaceExisting, bool checkOverrideRule)

Parameters

NameTypeDescription
newVal JobVariable

The variable to add. The Name must be unique if replaceExisting is false.

replaceExisting bool

Determines whether any existing variable with the same Name should be replaced. If true any existing variable with the same name is replaced. If false and there is an existing variable with the same name, a DuplicateItemException is thrown.

checkOverrideRule bool

Exceptions

DuplicateItemException

Thrown if the collection already contains a variable with the same Name and replaceExisting if false.

AddOrReplace(JobVariable)

Adds a variable to the collection or replaces the existing variable with the same Name.

public void AddOrReplace(JobVariable newVal)

Parameters

NameTypeDescription
newVal JobVariable

The variable to add. If the collection already contains a variable with the same Name it is replaced.

ContainsKey(string)

Determines whether the collection contains a variable with the specified name.

public bool ContainsKey(string variableName)

Parameters

NameTypeDescription
variableName string

The name of the variable to find (case-insensitive).

Returns

bool

ExpandTokens(string)

Expands variable tokens within source, replacing the tokens with the variable values

public string ExpandTokens(string source)

Parameters

NameTypeDescription
source string

The string to replace tokens in

Returns

string

Remarks

This method does not resolve inline script references.

GetItem(object)

Gets the member with the specified OID, name, or numeric index.

public override JobVariable GetItem(object index)

Parameters

NameTypeDescription
index object

The OID, name, or numeric index of the variable to retrieve

Returns

JobVariable

GetVariable(string)

Gets the variable with the specified name.

public JobVariable GetVariable(string variableName)

Parameters

NameTypeDescription
variableName string

The name of the variable to find (case-insensitive).

Returns

JobVariable

The variable with the specified name, or null if no matching variable is found.

IndexOf(string)

Gets the index of the variable with the specified name.

public int IndexOf(string variableName)

Parameters

NameTypeDescription
variableName string

The name of the variable to find (case-insensitive).

Returns

int

The index, or -1 if no matching variable is found.

Insert(int, JobVariable)

Inserts a variable into the the collection.

public override void Insert(int index, JobVariable newVal)

Parameters

NameTypeDescription
index int

The index to insert at.

newVal JobVariable

The variable to add. The Name must be unique.

Remarks

There isn't any point in using this method because the order of variables in the collection does not matter.

Exceptions

DuplicateItemException

Thrown if the collection already contains a variable with the same Name.

Remove(string)

Removes the variable with the specified name.

public bool Remove(string variableName)

Parameters

NameTypeDescription
variableName string

The name of the variable to remove (case-insensitive).

Returns

bool

True if the variable was removed, or False if no variable exists with that name.

TryGetValue(string, out JobVariable)

Attempts to get the variable with the specified Name.

public bool TryGetValue(string variableName, out JobVariable variable)

Parameters

NameTypeDescription
variableName string

The name of the variable to find.

variable JobVariable

The variable with the specified name, if found.

Returns

bool

true if a variable was found with the specified variableName

Inherited Members

Extension Methods