Method in
Removes all variables from storage.
public void Clear()Property in
Gets or sets the object to use when evaluating smart variables.
public ISmartVariableEvaluator? SmartVariableEvaluator { get; set; }Method in MemoryVariableStore
Given a variable name, attempts to fetch a value for the variable, either from storage, initial values found in Program , or by evaluating a smart variable found in Program .
public virtual bool TryGetValue<T>(string variableName, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result)string variableName
The name of the variable.
true if a value could be fetched; false otherwise.
Method in
Stores a string in this VariableStorage.
T result
If this method returns true , this parameter will contain the fetched value.
T
The type of the value to return. The fetched value will be converted to this type, if possible.
public virtual void SetValue(string variableName, string stringValue)string variableName
The name to associate with this variable.
string stringValue
The string to store.
Method in MemoryVariableStore
Stores a float in this VariableStorage.
public virtual void SetValue(string variableName, float floatValue)string variableName
The name to associate with this variable.
float floatValue
The number to store.
Class in Yarn
Inherits from System.Object
A simple concrete implementation of IVariableStorage that keeps all variables in memory.
public class MemoryVariableStore : IVariableStorageMethod in
Stores a bool in this VariableStorage.
public virtual void SetValue(string variableName, bool boolValue)string variableName
The name to associate with this variable.
Removes all variables from storage.
Gets the kind of variable named name .
Stores a bool in this VariableStorage.
Stores a float in this VariableStorage.
Stores a string in this VariableStorage.
Given a variable name, attempts to fetch a value for the variable, either from storage, initial values found in , or by evaluating a smart variable found in .
Gets or sets the Yarn that stores information about the initial values of variables, and is able to produce values for smart variables.
Gets or sets the object to use when evaluating smart variables.
Property in
Gets or sets the Yarn that stores information about the initial values of variables, and is able to produce values for smart variables.
bool boolValue
The boolean value to store.
public Program? Program { get; set; }Method in MemoryVariableStore
Gets the kind of variable named name .
string name
The name of the variable.
A VariableKind enum representing the kind of the variable named name .
public VariableKind GetVariableKind(string name)