EvaluationContext Class |
Namespace: CMS.MacroEngine
public class EvaluationContext
The EvaluationContext type exposes the following members.
Name | Description | |
---|---|---|
EvaluationContext |
Creates new EvaluationContext which takes the default values from resolver. Note that these can be modified during evaluation process via macro parameters.
|
Name | Description | |
---|---|---|
AllowOnlySimpleMacros |
Determines whether only simple macros (macros which do not require security check) are allowed.
| |
CaseSensitive |
Determines whether string comparison and other operations are case sensitive. False by default.
| |
ConsoleOutput |
Console output - place where the results can be written during macro evaluation using a "print" method.
All child contexts share the output with the parent context (= there is only one console output).
| |
Culture |
Culture under which the expression is evaluated. Important for parsing double / datetime from string constants, etc. EN-US by default.
| |
CultureInfo |
CultureInfo reflecting Culture property.
| |
Debug |
Determines if the evaluation debugs details
| |
DefaultValue |
Default value of the evaluation. Used when result of the whole macro is empty string.
| |
DetailedDebug |
Determines if the evaluation debugs details
| |
EncapsulateMacroObjects |
If true, the object will be encapsulated to its macro representations
| |
Encode |
Determines whether the result of the expression should be encoded or not.
| |
EvaluationStarted |
Time when the evaluation started (needed for timeout evaluation).
| |
EvaluationTimeout |
Expression evaluation timeout in milliseconds (1000 ms by default). If the evaluation time of the expression exceeds this time, evaluation will be aborted and the result will be null.
The evaluation abortion is then logged into event log.
| |
ExternalTimeoutChecker |
Gets or sets the function used as timeout watchdog besides EvaluationTimeout setting. Returns true if timeout has occurred.
| |
HandleSQLInjection |
Determines whether the apostrophes in the result will be doubled to handle SQL injection.
| |
Hash |
Gets or sets the hash against which the security is checked.
| |
CheckSecurity |
Main setting determining whether the macro security (signatures) is checked.
| |
IntegrityPassed |
Determines whether the security parameters are consistent with the evaluated macro.
| |
OriginalExpression |
Gets or sets the expression which is being evaluated.
| |
OriginalExpressionType |
Gets or sets the type of the expression which is being evaluated (% or $ or ?).
| |
Recursive |
Determines whether the macros in the result should be resolved as well.
| |
RelatedObject |
Related object allows set object used for resolving in macro method. Used in web part properties.
| |
Resolver |
Resolver which is used for the expression evaluation.
| |
ResolverName |
Gets or sets the name of the resolver which can resolve this macro (reflects inline |(resolver) parameter).
| |
User |
Gets the user associated with this context (based on the UserName property)
| |
UserName |
Gets or sets the username against which the security is checked.
|
Name | Description | |
---|---|---|
AddInnerSource |
Adds inner source(s) to this instance of the context.
| |
AddPrioritizedInnerSource |
Adds prioritized inner source(s) to this instance of the context.
| |
ClearInnerSources |
Clears all inner sources (does not clear parent inner sources).
| |
ClearPrioritizedInnerSources |
Clears all prioritized inner sources (does not clear parent inner sources).
| |
CreateChildContext |
Creates child context (clones the parent settings and creates child of the resolver).
| |
CreateChildContext(Boolean) |
Creates child context (clones the parent settings and creates child of the resolver).
| |
GetInnerSources |
Returns list of all aggregated inner sources (from the whole context hierarchy).
| |
GetPrioritizedInnerSources |
Returns list of all aggregated prioritized inner sources (from the whole context hierarchy).
|