Class VariablesCollection
public class VariablesCollection : IEnumerable<Variable>, IEnumerable
- Inheritance
-
VariablesCollection
- Implements
- Inherited Members
- Extension Methods
Properties
Count
public int Count { get; }
Property Value
Methods
Clear()
public void Clear()
Contains(string)
public bool Contains(string variableName)
Parameters
variableNamestring
Returns
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<Variable> GetEnumerator()
Returns
- IEnumerator<Variable>
An enumerator that can be used to iterate through the collection.
Get<T>(string, T?)
Attempts to get variable with given name of T type. If no such variable is
found, defaultValue is retrieved.
public T? Get<T>(string name, T? defaultValue = default)
Parameters
namestringName of the variable.
defaultValueTValue, that will be retrieved when no variable with given
nameofTtype was found.
Returns
- T
Variable value or
defaultValueif no variable with givennameofTtype was found.
Type Parameters
TType of the variable.
Remove(string)
public bool Remove(string variableName)
Parameters
variableNamestring
Returns
RemoveVariablesWithTag(string)
Attempts to remove all variables with given tag. If removal of any of them fails,
false is retrieved.
public bool RemoveVariablesWithTag(string tag)
Parameters
tagstringTag by which variables are going to be deleted.
Returns
- bool
Whether removal of all variables tagged with
tagwas successfull. If at least one removal failed,falseis returned.
Set<T>(string, T?, params string[])
public void Set<T>(string variableName, T? value, params string[] tags)
Parameters
Type Parameters
T