Interface IResolverSource
- Namespace
- Invex.Rez.Abstraction
- Assembly
- Invex.Rez.dll
Provides a map of variables and functions to be used by an IResolver.
[PublicAPI]
public interface IResolverSource
Methods
ResolveFunction(string)
Resolves a function with the given name.
Func<FunctionCall, string>? ResolveFunction(string name)
Parameters
namestringThe name of the function to resolve.
Returns
- Func<FunctionCall, string>
A delegate that produces the function's result from a FunctionCall, or null if this source cannot resolve the function.
Returning null allows the next source registered with the IResolver to be queried.
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".
ResolveVariable(string)
Resolves a variable with the given name.
string? ResolveVariable(string name)
Parameters
namestringThe name of the variable to resolve.
Returns
- string
The value of the variable, or null if this source cannot resolve the variable.
Returning null allows the next source registered with the IResolver to be queried.
Remarks
The braces that denote a variable in a template are not included in the name -
for the template {color}, the name is "color".