Class ZptSharpHostingBuilderExtensions
Extension methods for IBuildsHostingEnvironment instances.
Inheritance
Inherited Members
Namespace: ZptSharp
Assembly: ZptSharp.dll
Syntax
public static class ZptSharpHostingBuilderExtensions
Methods
| Improve this Doc View SourceAddStandardZptExpressions(IBuildsHostingEnvironment)
Configures ZptSharp to use a number of expression-types which are part of the ZPT standard.
Declaration
public static IBuildsHostingEnvironment AddStandardZptExpressions(this IBuildsHostingEnvironment builder)
Parameters
Type | Name | Description |
---|---|---|
IBuildsHostingEnvironment | builder | The hosting builder. |
Returns
Type | Description |
---|---|
IBuildsHostingEnvironment | The same builder instance, after setting it up. |
Remarks
The expression evaluators (expression types) supported by this method are parts of the formal ZPT standard, thus they are very frequently used within ZPT document templates. Using this method is equivalent to using all three of the following:
AddZptNotExpressions(IBuildsHostingEnvironment)
Configures ZptSharp to read and handle TALES "not" expressions.
Declaration
public static IBuildsHostingEnvironment AddZptNotExpressions(this IBuildsHostingEnvironment builder)
Parameters
Type | Name | Description |
---|---|---|
IBuildsHostingEnvironment | builder | The hosting builder. |
Returns
Type | Description |
---|---|
IBuildsHostingEnvironment | The same builder instance, after setting it up. |
AddZptPathExpressions(IBuildsHostingEnvironment)
Configures ZptSharp to read and handle TALES "path" expressions.
Declaration
public static IBuildsHostingEnvironment AddZptPathExpressions(this IBuildsHostingEnvironment builder)
Parameters
Type | Name | Description |
---|---|---|
IBuildsHostingEnvironment | builder | The hosting builder. |
Returns
Type | Description |
---|---|
IBuildsHostingEnvironment | The same builder instance, after setting it up. |
Remarks
This method primarily registers the evaluator for "path" expressions. There are three lesser-used variants of path expressions which are also included in this method though. The expression evaluators and expression prefixes supported by this method are:
- PathExpressionEvaluator, using the prefix
path
. - LocalVariablesOnlyPathExpressionEvaluator, using the prefix
local
. - GlobalVariablesOnlyPathExpressionEvaluator, using the prefix
global
. - DefinedVariablesOnlyPathExpressionEvaluator, using the prefix
var
.
AddZptPipeExpressions(IBuildsHostingEnvironment)
Configures ZptSharp to read and handle TALES "pipe" expressions.
Declaration
public static IBuildsHostingEnvironment AddZptPipeExpressions(this IBuildsHostingEnvironment builder)
Parameters
Type | Name | Description |
---|---|---|
IBuildsHostingEnvironment | builder | The hosting builder. |
Returns
Type | Description |
---|---|
IBuildsHostingEnvironment | The same builder instance, after setting it up. |
AddZptStringExpressions(IBuildsHostingEnvironment)
Configures ZptSharp to read and handle TALES "string" expressions.
Declaration
public static IBuildsHostingEnvironment AddZptStringExpressions(this IBuildsHostingEnvironment builder)
Parameters
Type | Name | Description |
---|---|---|
IBuildsHostingEnvironment | builder | The hosting builder. |
Returns
Type | Description |
---|---|
IBuildsHostingEnvironment | The same builder instance, after setting it up. |
Remarks
This method registers the StringExpressionEvaluator under both of the
prefixes string
& a shortened alias str
.
AddZptStructureExpressions(IBuildsHostingEnvironment)
Configures ZptSharp to read and handle TALES "structure" expressions.
Declaration
public static IBuildsHostingEnvironment AddZptStructureExpressions(this IBuildsHostingEnvironment builder)
Parameters
Type | Name | Description |
---|---|---|
IBuildsHostingEnvironment | builder | The hosting builder. |
Returns
Type | Description |
---|---|
IBuildsHostingEnvironment | The same builder instance, after setting it up. |