Interface IMacroResolver
- Namespace
- CMS.MacroEngine
- Assembly
- CMS.MacroEngine.dll
Interface for resolver objects.
public interface IMacroResolver
- Extension Methods
Methods
CheckDataSources(string, EvaluationContext)
Checks all the data sources for the value. Returns true if given data member was found within supported data sources.
EvaluationResult CheckDataSources(string expression, EvaluationContext context)
Parameters
expression
stringData member to look for
context
EvaluationContextEvaluation context
Returns
GetObjectValue(object, int, EvaluationContext)
Gets the object value at given index (this is called when indexer [(int)] is used in the expression).
EvaluationResult GetObjectValue(object obj, int index, EvaluationContext context)
Parameters
obj
objectSource object to get the index-th value from
index
intIndex of the item to get
context
EvaluationContextEvaluation context
Returns
GetObjectValue(object, string, EvaluationContext)
Gets the object value of specified name.
EvaluationResult GetObjectValue(object obj, string columnName, EvaluationContext context)
Parameters
obj
objectSource object to get the index-th value from
columnName
stringName of the value to get
context
EvaluationContextEvaluation context
Returns
ResolveMacroExpression(ResolveExpressionSettings)
Resolves the data macro expression (expects expression without {% %} brackets).
EvaluationResult ResolveMacroExpression(ResolveExpressionSettings settings)
Parameters
settings
ResolveExpressionSettingsSettings of the resolving process
Returns
ResolveMacros(string, MacroSettings)
Resolves all supported macro types in the given text within specified resolving context.
string ResolveMacros(string text, MacroSettings settings = null)
Parameters
text
stringInput text with macros to be resolved
settings
MacroSettingsMacro context to be used for resolving (if null, context of the resolver is used)
Returns
- string