Interface IResolverStore
- Namespace
- Invex.Rez.Abstraction
- Assembly
- Invex.Rez.dll
Provides a map of variables and functions to be used by an IResolver, as well as the ability to add and remove variables and functions at any time.
[PublicAPI]
public interface IResolverStore : IResolverSource
- Inherited Members
Methods
AddFunction(string, Func<FunctionCall, string>)
Adds a function to the store.
If a function with the same name already exists, it is replaced.
void AddFunction(string name, Func<FunctionCall, string> function)
Parameters
namestringThe name of the function to add.
functionFunc<FunctionCall, string>The function to add.
Note: the function should never return null; instead, return an empty string for a blank result.
Remarks
The braces, parentheses, and arguments that denote a function in a template are not included
in the name - for the template {repeat(abc,3)}, the name is "repeat".
AddVariable(string, string)
Adds a variable to the store.
If a variable with the same name already exists, its value is replaced.
void AddVariable(string name, string value)
Parameters
namestringThe name of the variable to add.
valuestringThe value of the variable to add.
Note: the value should never be null; instead, use an empty string for a blank result.
Remarks
The braces that denote a variable in a template are not included in the name -
for the template {color}, the name is "color".
RemoveFunction(string)
Removes a function from the store.
If the function was not added, this method does nothing.
void RemoveFunction(string name)
Parameters
namestringThe name of the function to remove.
Remarks
The braces, parentheses, and arguments that denote a function in a template are not included
in the name - for the template {repeat(abc,3)}, the name is "repeat".
RemoveVariable(string)
Removes a variable from the store.
If the variable was not added, this method does nothing.
void RemoveVariable(string name)
Parameters
namestringThe name of the variable to remove.
Remarks
The braces that denote a variable in a template are not included in the name -
for the template {color}, the name is "color".