Show / Hide Table of Contents

Interface IInterpretsExpressionResult

An object which interprets the result of a TALES expression, for the purposes of TAL.

Namespace: ZptSharp.Tal
Assembly: ZptSharp.Abstractions.dll
Syntax
public interface IInterpretsExpressionResult

Methods

| Improve this Doc View Source

CoerceResultToBoolean(Object)

Gets a value which is the boolean representation of the specified result, following the rules of boolean type coercion for ZPT. This is used by various TAL attributes to determine whether a value is 'truthy' or 'falsey'.

Declaration
bool CoerceResultToBoolean(object expressionResult)
Parameters
Type Name Description
System.Object expressionResult

An expression result.

Returns
Type Description
System.Boolean

true, if result should be treated as boolean truth, false otherwise.

Remarks

This method will return false if the expressionResult is equal to the default of its data-type, otherwise it returns true.

For any data-type, the default of the type is what would be returned by default(T) for that type T.

Examples

For System.String this method returns false if the value is null, otherwise it returns true.

For System.Int32 this method returns false if the value is equal to zero, otherwise it returns true.

| Improve this Doc View Source

DoesResultAbortTheAction(Object)

Gets a value which indicates whether or not the expression result cancels the current action. See also: AbortZptActionToken.

Declaration
bool DoesResultAbortTheAction(object expressionResult)
Parameters
Type Name Description
System.Object expressionResult

Expression result.

Returns
Type Description
System.Boolean

true if the result cancels the action; otherwise, false.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX