MacroExpression Class |
Namespace: CMS.MacroEngine
public class MacroExpression
The MacroExpression type exposes the following members.
Name | Description | |
---|---|---|
MacroExpression(ListMacroElement) |
Constructor.
| |
MacroExpression(ListMacroElement, Int32, Int32) |
Constructor.
|
Name | Description | |
---|---|---|
ExtractParameter |
Extracts specified parameter of Rule expression.
| |
GetElement |
Gets the element on specific index of this expression.
| |
GetInfixMethodCall |
Returns string representation of the method in format MyMethod(First, Second, Third).
| |
GetPrefixMethodCall |
Returns string representation of the method in format First.MyMethod(Second, Third).
| |
GetPriority |
Gets the priority of the evaluation for the given method.
| |
GetRoot |
Gets the root of the expression.
| |
HasNumberOfChildren |
Returns true if the current expression node has exactly specified number of children.
| |
CheckSyntax |
Checks the syntactic tree of parsed expression if everything is OK and ready for correct evaluation.
| |
InitMethodOnResult |
Transfers the current result to a first child (for the parameter of method).
| |
InitPropertyOnDataMember |
Transfers the current result to a first child.
| |
IsFlatOperator |
Returns true for operators which can be made flat - without subexpressions (||, &&, +, etc.)
| |
IsMethodWithName |
Returns true if the type of current expression is MethodCall with specified name.
| |
IsSpecialCommand |
Returns true for special commands such as break or continue, otherwise false.
| |
MakeFlatter |
Modifies the syntactic tree of the expression to the flat structure. Changes expressions like "(a || b) || c" to "a || b || c", etc.
| |
MakeChildOfPrevious |
Makes current element child of the previous element if exists.
| |
Parse(Int32) |
Parses the expression.
| |
Parse(Int32, Boolean) |
Parses the expression.
| |
ParseAll |
Parses the whole expression tree.
| |
ParseExpression |
Returns the root of parsed expression. Uses cache of the parsed expressions to speedup the process.
| |
ParseParameters |
Parses the method or indexer parameters.
| |
ReplaceChild |
Replaces the given child expression with the given one.
| |
SyntaxError |
Aborts the parsing of the expression due to a syntactic error
| |
ToString |
Returns string representation of this MacroExpression.
(Overrides ObjectToString.) | |
ToString(Boolean) |
Returns string representation of this MacroExpression.
| |
ToStringBlock |
Handles block of code: { [some code] }
| |
ToStringCommand |
Handles special commands like return, break, etc.
| |
ToStringConstant |
Handles constants (string literal, numbers, booleans, etc.).
| |
ToStringControlFlowStatements |
Handles structures like [commandname] { [some code] }
| |
ToStringIndexer |
Handles indexer expressions.
| |
ToStringMethod |
Handles classic method calls.
| |
ToStringProperty |
Handles properties.
|
Name | Description | |
---|---|---|
AsValue |
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.) | |
GetAPIString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
GetString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
ToBoolean |
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDateTime |
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDouble |
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToGuid |
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToInteger |
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToString |
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.) |
Name | Description | |
---|---|---|
mChildren |
Children expressions (parameters of method or subexpression).
| |
mParameters |
Parameters for the given expression (backward compatibility).
| |
mPriority |
Priority of the method.
| |
mSyntacticTreeTable |
Hash table with cached parsed expressions to speedup the macro evaluation.
|
Name | Description | |
---|---|---|
EndIndex |
Ending index of the expression in the source.
| |
Children |
Child expressions of the expression.
| |
Name |
Name of the data member or method call.
| |
Next |
Next expression to evaluate.
| |
Parameters |
Parameters for the given expression; i.e. |(paramname)value expressions.
| |
Parent |
Parent expression.
| |
Previous |
Previous expression (the expression from which this expression is the next).
| |
Priority |
Gets the element priority.
| |
SourceElements |
Elements from the source expression.
| |
StartIndex |
Starting index of the expression in the source.
| |
Type |
Returns the expression type.
| |
Value |
Value of the value expression (is null for expression types like method, property, etc.).
|