Show / Hide Table of Contents

Class AbortZptActionToken

An object which indicates that the current ZPT action should be cancelled/aborted.

Inheritance
System.Object
AbortZptActionToken
Implements
System.IEquatable<AbortZptActionToken>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Expressions
Assembly: ZptSharp.Abstractions.dll
Syntax
public sealed class AbortZptActionToken : IEquatable<AbortZptActionToken>
Remarks

This object is used only as the return from EvaluateExpressionAsync(String, ExpressionContext, CancellationToken), when an expression wishes to indicate to ZptSharp that the current operation should be aborted.

Each TAL operation reacts differently to receiving this object as the result of an expression. As a rule of thumb though, when an expression results in an instance of this object, the TAL operation will attempt to avoid altering the source document. For example, a tal:content attribute would abort changing the content of the element if the attribute value evaluates to an instance of this type. In that case, the original content from the source file would be left in-place, as if the tal:content attribute had not been present at all.

Whilst it is possible to construct new instances of this type, because it has no state and is sealed, it is pointless to do so. All instances of this type are considered equal and will all produce the same hash codes. It is recommended to use Instance in order to refer to this object.

Properties

| Improve this Doc View Source

Instance

Gets a default/singleton instance of the abort-action token. For clarity, this is the recommended way to get a reference to this type.

Declaration
public static AbortZptActionToken Instance { get; }
Property Value
Type Description
AbortZptActionToken

The instance.

Methods

| Improve this Doc View Source

Equals(Object)

Determines whether the specified System.Object is equal to the current AbortZptActionToken.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The System.Object to compare with the current AbortZptActionToken.

Returns
Type Description
System.Boolean

true if the specified System.Object is equal to the current AbortZptActionToken; otherwise, false.

Overrides
System.Object.Equals(System.Object)
Remarks

Any instance of AbortZptActionToken is considered equal to any other instance of AbortZptActionToken by this method. This type is not considered equal to any instance of any other type, though.

| Improve this Doc View Source

Equals(AbortZptActionToken)

Determines whether the specified AbortZptActionToken is equal to the current AbortZptActionToken.

Declaration
public bool Equals(AbortZptActionToken other)
Parameters
Type Name Description
AbortZptActionToken other

The AbortZptActionToken to compare with the current AbortZptActionToken.

Returns
Type Description
System.Boolean

true if the specified AbortZptActionToken is equal to the current AbortZptActionToken; otherwise, false.

Remarks

All instances of AbortZptActionToken are considered equal by this method.

| Improve this Doc View Source

GetHashCode()

Serves as a hash function for a AbortZptActionToken object.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table.

Overrides
System.Object.GetHashCode()
Remarks

This method returns a hard-coded hash code of zero. This means that all instances of this type will always return the same hash code. This type is not suitable for use as the key of a hash table.

Implements

System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX