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
variableName
string
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
name
stringName of the variable.
defaultValue
TValue, that will be retrieved when no variable with given
name
ofT
type was found.
Returns
- T
Variable value or
defaultValue
if no variable with givenname
ofT
type was found.
Type Parameters
T
Type of the variable.
Remove(string)
public bool Remove(string variableName)
Parameters
variableName
string
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
tag
stringTag by which variables are going to be deleted.
Returns
- bool
Whether removal of all variables tagged with
tag
was successfull. If at least one removal failed,false
is returned.
Set<T>(string, T?, params string[])
public void Set<T>(string variableName, T? value, params string[] tags)
Parameters
Type Parameters
T