Class JobVariableCollection
- Namespace
- ArcanaDevelopment.adTempus.Client.Collections
- Assembly
- ArcanaDevelopment.adTempus.Client.dll
A collection of JobVariables.
public sealed class JobVariableCollection : ADTObjectCollectionT<JobVariable>
- Inheritance
-
objectJobVariableCollection
Constructors
JobVariableCollection()
public JobVariableCollection()
Methods
Add(JobVariable)
Adds a variable to the collection.
public override void Add(JobVariable newVal)
Parameters
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
newVal |
JobVariable | The variable to add. The Name must be unique if |
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
replaceExistingif false.
AddOrReplace(JobVariable)
Adds a variable to the collection or replaces the existing variable with the same Name.
public void AddOrReplace(JobVariable newVal)
Parameters
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
index |
object | The OID, name, or numeric index of the variable to retrieve |
Returns
GetVariable(string)
Gets the variable with the specified name.
public JobVariable GetVariable(string variableName)
Parameters
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
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
- ADTObjectCollectionT<JobVariable>.Contains(OID)
- ADTObjectCollectionT<JobVariable>.GetAt(int)
- ADTObjectCollectionT<JobVariable>.GetObject(OID)
- ADTObjectCollectionT<JobVariable>.this[object]
- ADTObjectCollectionT<JobVariable>.GetEnumerator()
- ADTObjectCollectionT<JobVariable>.MoveItem(int, int)
- ADTObjectCollectionT<JobVariable>.Remove(JobVariable)
- ADTObjectCollectionT<JobVariable>.RemoveByOID(OID)
- ADTObjectCollectionT<JobVariable>.RemoveAt(int)
- ADTObjectCollectionT<JobVariable>.Remove(object)
- ADTObjectCollectionT<JobVariable>.Clear()
- ADTObjectCollectionT<JobVariable>.AddRange(IEnumerable<JobVariable>)
- ADTObjectCollectionT<JobVariable>.UpdateFrom(IEnumerable<JobVariable>)
- ADTObjectCollectionT<JobVariable>.UpdateFrom(IEnumerable, bool)
- ADTObjectCollectionT<JobVariable>.Sort(IComparer<JobVariable>)
- ADTObjectCollectionT<JobVariable>.Sort(Comparison<JobVariable>)
- ADTObjectCollectionT<JobVariable>.Sort(int, int, IComparer<JobVariable>)
- ADTObjectCollectionT<JobVariable>.ObjectAdding
- ADTObjectCollectionT<JobVariable>.ObjectRemoving
- ADTObjectCollectionT<JobVariable>.EntityAdded
- ADTObjectCollectionT<JobVariable>.EntityRemoved
- ObjectCollectionT<JobVariable>.IsReadOnly
- ObjectCollectionT<JobVariable>.Contains(JobVariable)
- ObjectCollectionT<JobVariable>.CopyTo(JobVariable[], int)
- ObjectCollectionT<JobVariable>.Count
- ObjectCollectionT<JobVariable>.MoveUp(JobVariable)
- ObjectCollectionT<JobVariable>.MoveDown(JobVariable)
- ObjectCollectionT<JobVariable>.MoveItem(JobVariable, int)
- ObjectCollectionT<JobVariable>.this[int]
- ObjectCollectionT<JobVariable>.IndexOf(JobVariable)