Method | Description | |
---|---|---|
Block ( |
Create a sequential block of nodes
|
|
Conditional ( |
Evaluates an expression and chooses between two blocks based on the truthy-ness of the result
|
|
Extend ( string templateName, |
Defines a template that extends another template e.g. MasterPages Extend nodes must be the root of a syntax tree
|
|
Flush ( |
Flushes the TextWriter. Used to optimize responses in web applications.
|
|
Helper ( HelperExpressionNode helperExpression, |
||
Include ( string templateName, |
Execute another template in the scope of the provided model
|
|
Iterate ( |
Iterate a collection and execute the body block scoped to each item in the collection. Optionally execute an empty block when there are no items to iterate
|
|
Override ( string overrideName, |
Defines a point in a template that can be overridden when the template is extended.
|
|
Override ( string overrideName, |
Defines an optional point in a template that can be overridden when the template is extended. If the point is not overridden then the specified content is used by default
|
|
ScopeNode ( |
Scopes a node to a new model
|
|
WriteExpression ( |
Evaluate an expression and write the value to the TextWriter
|
|
WriteString ( string content, |
Write a string literal to the TextWriter
|
public static Block ( |
||
location | ||
return |
public static Conditional ( |
||
expression | The expression to evaluate | |
location | ||
trueBlock | The block to execute when the expression is true | |
falseBlock | The block to evaluate when the expression is false | |
return |
public static Extend ( string templateName, |
||
templateName | string | The name of the template to extend. It will be loaded from the |
location | ||
overrides | SyntaxTreeNode>.IDictionary | A set of overrides for the |
return |
public static Flush ( |
||
location | ||
return | FlushNode |
public static Helper ( HelperExpressionNode helperExpression, |
||
helperExpression | HelperExpressionNode | |
block | ||
location | ||
return |
public static Include ( string templateName, |
||
templateName | string | The name of the template to execute. It will be loaded from the |
modelExpression | An expression for the model to be used as the root scope when executing the template | |
location | ||
return |
public static Iterate ( |
||
collectionExpression | expression to load the collection | |
location | ||
body | Block to execute in the scope of each item | |
emptyBody | Block to execute when there are no items in the collection | |
return |
public static Override ( string overrideName, |
||
overrideName | string | The name of the override which must match that specified in the overriding template |
location | ||
isOptional | bool | Indicates whether an exception should be thrown if the override is missing |
return |
public static Override ( string overrideName, |
||
overrideName | string | The name of the override which must match that specified in the overriding template |
defaultContent | The content to use when the point is not overridden | |
location | ||
return |
public static ScopeNode ( |
||
modelToScopeTo | An expression that evaluates to the model to scope to | |
node | The node to execute in the new scope | |
location | ||
return |
public static WriteExpression ( |
||
expression | The expression to be written | |
location | ||
htmlEncode | bool | Indicates whether the content should be html encoded before being written |
return | WriteExpressionNode |
public static WriteString ( string content, |
||
content | string | The string to be written |
location | ||
return |