Show / Hide Table of Contents

Class TalExpressionResultInterpreter

Implementation of IInterpretsExpressionResult which provides interpretations of expression results, following the rules of TAL.

Inheritance
System.Object
TalExpressionResultInterpreter
Implements
IInterpretsExpressionResult
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Tal
Assembly: ZptSharp.dll
Syntax
public class TalExpressionResultInterpreter : 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
public 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
public 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.

Implements

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