Class TalContextProcessorFactory
Implementation of IGetsTalContextProcessor which returns a context processor suitable for processing the TAL model-binding syntax.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Tal
Assembly: ZptSharp.dll
Syntax
public class TalContextProcessorFactory : IGetsTalContextProcessor
Remarks
This factory assembles a service which uses the decorator pattern. Each individual attribute is handled by a separate decorator class (which handles just that attribute). At the centre of the decorator stack is a no-op service.
The OnErrorAttributeDecorator is special, in that it uses a try/catch
construct to intercept any errors which occur in other decorators which are 'deeper' in the stack.
Constructors
| Improve this Doc View SourceTalContextProcessorFactory(IGetsTalAttributeSpecs, IEvaluatesExpression, IInterpretsExpressionResult, IGetsVariableDefinitionsFromAttributeValue, IEvaluatesDomValueExpression, ILogger<OnErrorAttributeDecorator>, IReplacesNode, IOmitsNode, IGetsRepetitionContexts, IGetsAttributeDefinitions, IGetsMetalAttributeSpecs, ILogger<ContentOrReplaceAttributeDecorator>)
Initializes a new instance of the TalContextProcessorFactory class.
Declaration
public TalContextProcessorFactory(IGetsTalAttributeSpecs specProvider, IEvaluatesExpression evaluator, IInterpretsExpressionResult resultInterpreter, IGetsVariableDefinitionsFromAttributeValue definitionProvider, IEvaluatesDomValueExpression domEvaluator, ILogger<OnErrorAttributeDecorator> onErrorlogger, IReplacesNode replacer, IOmitsNode omitter, IGetsRepetitionContexts repetitionContextProvider, IGetsAttributeDefinitions attributeDefinitionsProvider, IGetsMetalAttributeSpecs metalSpecProvider, ILogger<ContentOrReplaceAttributeDecorator> contentReplaceLogger)
Parameters
Type | Name | Description |
---|---|---|
IGetsTalAttributeSpecs | specProvider | Spec provider. |
IEvaluatesExpression | evaluator | Evaluator. |
IInterpretsExpressionResult | resultInterpreter | Result interpreter. |
IGetsVariableDefinitionsFromAttributeValue | definitionProvider | Definition provider. |
IEvaluatesDomValueExpression | domEvaluator | DOM evaluator. |
Microsoft.Extensions.Logging.ILogger<OnErrorAttributeDecorator> | onErrorlogger | On errorlogger. |
IReplacesNode | replacer | Replacer. |
IOmitsNode | omitter | Omitter. |
IGetsRepetitionContexts | repetitionContextProvider | Repetition context provider. |
IGetsAttributeDefinitions | attributeDefinitionsProvider | The 'attributes' attribute definitions provider. |
IGetsMetalAttributeSpecs | metalSpecProvider | METAL attribute spec provider. |
Microsoft.Extensions.Logging.ILogger<ContentOrReplaceAttributeDecorator> | contentReplaceLogger | Content or replace logger. |
Methods
| Improve this Doc View SourceGetTalContextProcessor()
Gets the TAL context processor.
Declaration
public IHandlesProcessingError GetTalContextProcessor()
Returns
Type | Description |
---|---|
IHandlesProcessingError | The TAL context processor. |