Click or drag to resize
EvaluationContext Class
Context for macro expression evaluation. Reflects resolver settings and inline macro parameters.
Inheritance Hierarchy
SystemObject
  CMS.MacroEngineEvaluationContext

Namespace: CMS.MacroEngine
Assembly: CMS.MacroEngine (in CMS.MacroEngine.dll) Version: 10.0.0
Syntax
C#
public class EvaluationContext

The EvaluationContext type exposes the following members.

Constructors
  NameDescription
Public methodEvaluationContext
Creates new EvaluationContext which takes the default values from resolver. Note that these can be modified during evaluation process via macro parameters.
Top
Properties
  NameDescription
Public propertyAllowOnlySimpleMacros
Determines whether only simple macros (macros which do not require security check) are allowed.
Public propertyCaseSensitive
Determines whether string comparison and other operations are case sensitive. False by default.
Public propertyConsoleOutput
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).
Public propertyCulture
Culture under which the expression is evaluated. Important for parsing double / datetime from string constants, etc. EN-US by default.
Public propertyCultureInfo
CultureInfo reflecting Culture property.
Public propertyDebug
Determines if the evaluation debugs details
Public propertyDefaultValue
Default value of the evaluation. Used when result of the whole macro is empty string.
Public propertyDetailedDebug
Determines if the evaluation debugs details
Public propertyEncapsulateMacroObjects
If true, the object will be encapsulated to its macro representations
Public propertyEncode
Determines whether the result of the expression should be encoded or not.
Public propertyEvaluationStarted
Time when the evaluation started (needed for timeout evaluation).
Public propertyEvaluationTimeout
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.
Public propertyExternalTimeoutChecker
Gets or sets the function used as timeout watchdog besides EvaluationTimeout setting. Returns true if timeout has occurred.
Public propertyHandleSQLInjection
Determines whether the apostrophes in the result will be doubled to handle SQL injection.
Public propertyHash
Gets or sets the hash against which the security is checked.
Public propertyCheckSecurity
Main setting determining whether the macro security (signatures) is checked.
Public propertyIntegrityPassed
Determines whether the security parameters are consistent with the evaluated macro.
Public propertyOriginalExpression
Gets or sets the expression which is being evaluated.
Public propertyOriginalExpressionType
Gets or sets the type of the expression which is being evaluated (% or $ or ?).
Public propertyRecursive
Determines whether the macros in the result should be resolved as well.
Public propertyRelatedObject
Related object allows set object used for resolving in macro method. Used in web part properties.
Public propertyResolver
Resolver which is used for the expression evaluation.
Public propertyResolverName
Gets or sets the name of the resolver which can resolve this macro (reflects inline |(resolver) parameter).
Public propertyUser
Gets the user associated with this context (based on the UserName property)
Public propertyUserName
Gets or sets the username against which the security is checked.
Top
Methods
  NameDescription
Public methodAddInnerSource
Adds inner source(s) to this instance of the context.
Public methodAddPrioritizedInnerSource
Adds prioritized inner source(s) to this instance of the context.
Public methodClearInnerSources
Clears all inner sources (does not clear parent inner sources).
Public methodClearPrioritizedInnerSources
Clears all prioritized inner sources (does not clear parent inner sources).
Public methodCreateChildContext
Creates child context (clones the parent settings and creates child of the resolver).
Public methodCreateChildContext(Boolean)
Creates child context (clones the parent settings and creates child of the resolver).
Public methodGetInnerSources
Returns list of all aggregated inner sources (from the whole context hierarchy).
Public methodGetPrioritizedInnerSources
Returns list of all aggregated prioritized inner sources (from the whole context hierarchy).
Top
See Also