Show / Hide Table of Contents

Class YieldToken

Token to observe requests to yield execution.

Inheritance
System.Object
YieldToken
Implements
System.IEquatable<YieldToken>
Namespace: Reaqtive.Scheduler
Assembly: Reaqtive.Interfaces.dll
Syntax
public sealed class YieldToken : ValueType, IEquatable<YieldToken>

Constructors

YieldToken(IYieldTokenSource)

Creates a new YieldToken value using the specified yield token source to check for yield requests.

Declaration
public YieldToken(IYieldTokenSource source)
Parameters
Type Name Description
IYieldTokenSource source

The yield token source used to check for yield requests.

Properties

IsYieldRequested

Gets whether yielding has been requested for this token.

Declaration
public bool IsYieldRequested { get; }
Property Value
Type Description
System.Boolean

None

Returns an empty YieldToken value.

Declaration
public static YieldToken None { get; }
Property Value
Type Description
YieldToken

Methods

Equals(YieldToken)

Determines whether the current YieldToken instance is equal to the specified System.Object.

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

The other YieldToken to which to compare this instance.

Returns
Type Description
System.Boolean

true if other is a YieldToken and if the two instances are equal; objwise, false. Two tokens are equal if they are associated with the same token source or if they were both constructed from public YieldToken constructors and their IsYieldRequested values are equal.

Equals(Object)

Determines whether the current YieldToken instance is equal to the specified System.Object.

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

The other object to which to compare this instance.

Returns
Type Description
System.Boolean

true if obj is a YieldToken and if the two instances are equal; objwise, false. Two tokens are equal if they are associated with the same token source or if they were both constructed from public YieldToken constructors and their IsYieldRequested values are equal.

GetHashCode()

Serves as a hash function for a YieldToken.

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

A hash code for the current YieldToken instance.

Operators

Equality(YieldToken, YieldToken)

Determines whether two YieldToken instances are equal.

Declaration
public static bool operator ==(YieldToken left, YieldToken right)
Parameters
Type Name Description
YieldToken left

The first instance.

YieldToken right

The second instance.

Returns
Type Description
System.Boolean

true if the instances are equal; otherwise, false.

Inequality(YieldToken, YieldToken)

Determines whether two YieldToken instances are not equal.

Declaration
public static bool operator !=(YieldToken left, YieldToken right)
Parameters
Type Name Description
YieldToken left

The first instance.

YieldToken right

The second instance.

Returns
Type Description
System.Boolean

true if the instances are not equal; otherwise, false.

Implements

System.IEquatable<>
In This Article
Back to top Generated by DocFX