All pages
Powered by GitBook
1 of 9

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Clear()

Method in

Removes all variables from storage.

public void Clear()

Summary

MemoryVariableStore

SmartVariableEvaluator

Property in

Gets or sets the object to use when evaluating smart variables.

public ISmartVariableEvaluator? SmartVariableEvaluator { get; set; }

Summary

MemoryVariableStore

TryGetValue<T>(string,T?)

Method in MemoryVariableStore

Summary

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)

Parameters

Name
Description

string variableName

The name of the variable.

Name
Description

true if a value could be fetched; false otherwise.

SetValue(string,string)

Method in

Stores a string in this VariableStorage.

Name
Description

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.

Type Parameters

Returns

public virtual void SetValue(string variableName, string stringValue)

string variableName

The name to associate with this variable.

Summary

Parameters

MemoryVariableStore

string stringValue

The string to store.

SetValue(string,float)

Method in MemoryVariableStore

Summary

Stores a float in this VariableStorage.

public virtual void SetValue(string variableName, float floatValue)

Parameters

Name
Description

string variableName

The name to associate with this variable.

float floatValue

The number to store.

MemoryVariableStore

Class in Yarn

Inherits from System.Object

Summary

A simple concrete implementation of IVariableStorage that keeps all variables in memory.

public class MemoryVariableStore : IVariableStorage

Methods

Name
Description

Name
Description

SetValue(string,bool)

Method in

Stores a bool in this VariableStorage.

Name
Description
public virtual void SetValue(string variableName, bool boolValue)

string variableName

The name to associate with this variable.

Summary

Parameters

MemoryVariableStore

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.

Properties

Clear()

Program

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.

GetVariableKind(string)
SetValue(string,bool)
SetValue(string,float)
SetValue(string,string)
TryGetValue(string,T?)
Program
Program
Program
Program
SmartVariableEvaluator
public Program? Program { get; set; }

Summary

MemoryVariableStore
Program

GetVariableKind(string)

Method in MemoryVariableStore

Summary

Gets the kind of variable named name .

Parameters

Name
Description

string name

The name of the variable.

Returns

A VariableKind enum representing the kind of the variable named name .

public VariableKind GetVariableKind(string name)