ZPT-Sharp  v1.0.0
Zope Page Templates for .NET
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
CSF.Zpt.Tales.SimpleEvaluatorSelector Class Reference

Simple implementation of IExpressionEvaluator which keeps a collection of the available evaluators in an IDictionary, indexed by their applicable prefixes. More...

Inheritance diagram for CSF.Zpt.Tales.SimpleEvaluatorSelector:
Collaboration diagram for CSF.Zpt.Tales.SimpleEvaluatorSelector:

Public Member Functions

virtual IExpressionEvaluator GetEvaluator (Expression expression)
 Gets an evaluator implementation suitable for a given expression. More...
 
IExpressionEvaluator GetEvaluator< TEvaluator > ()
 Gets an expression evaluator matching a desired type. More...
 
IExpressionEvaluator GetEvaluator (Type evaluatorType)
 Gets an expression evaluator matching a desired type. More...
 
 SimpleEvaluatorSelector (IExpressionEvaluatorService registry=null)
 Initializes a new instance of the CSF.Zpt.Tales.SimpleEvaluatorSelector class. More...
 

Properties

virtual IExpressionEvaluatorService EvaluatorRegistry [get]
 Gets the expression evaluator registry instance. More...
 

Detailed Description

Simple implementation of IExpressionEvaluator which keeps a collection of the available evaluators in an IDictionary, indexed by their applicable prefixes.

Constructor & Destructor Documentation

CSF.Zpt.Tales.SimpleEvaluatorSelector.SimpleEvaluatorSelector ( IExpressionEvaluatorService  registry = null)
inline

Initializes a new instance of the CSF.Zpt.Tales.SimpleEvaluatorSelector class.

Parameters
registryAn expression evaluator registry.

Member Function Documentation

virtual IExpressionEvaluator CSF.Zpt.Tales.SimpleEvaluatorSelector.GetEvaluator ( Expression  expression)
inlinevirtual

Gets an evaluator implementation suitable for a given expression.

Returns
The evaluator.
Parameters
expressionThe expression.

Implements CSF.Zpt.Tales.IEvaluatorSelector.

IExpressionEvaluator CSF.Zpt.Tales.SimpleEvaluatorSelector.GetEvaluator ( Type  evaluatorType)
inline

Gets an expression evaluator matching a desired type.

Returns
The evaluator instance.
Parameters
evaluatorTypeThe desired evaluator type.

Implements CSF.Zpt.Tales.IEvaluatorSelector.

Gets an expression evaluator matching a desired type.

Returns
The evaluator instance.
Template Parameters
TEvaluatorThe desired evaluator type.

Implements CSF.Zpt.Tales.IEvaluatorSelector.

Type Constraints
TEvaluator :IExpressionEvaluator 

Property Documentation

virtual IExpressionEvaluatorService CSF.Zpt.Tales.SimpleEvaluatorSelector.EvaluatorRegistry
getprotected

Gets the expression evaluator registry instance.

This is lazily initialised, because instances of SimpleEvaluatorSelector might be initialised by types which are registered with the individual evaluators. Thus, in order to avoid a scenario in which we are referencing the default registry before it has finished constructing, we ensure that we don't touch it until we need it.

The evaluator registry.


The documentation for this class was generated from the following file: