TaskPriorityOrSignal Struct

The priority of TaskSignalAnyInit: a fixed TaskPriority, or the TaskSignal whose priority is followed.

public readonly struct TaskPriorityOrSignal : IEquatable<TaskPriorityOrSignal>
Implements

Properties

NameDescription
PriorityGets the value as a TaskPriority, or null when the value is a signal.
SignalGets the value as a TaskSignal, or null when the value is a priority.
ValueGets the value: a TaskPriority or a TaskSignal.

Gets the value as a TaskPriority, or null when the value is a signal.

public TaskPriority? Priority { get; }

Property value

TaskPriority?

Gets the value as a TaskSignal, or null when the value is a priority.

public TaskSignal? Signal { get; }

Property value

TaskSignal?

Gets the value: a TaskPriority or a TaskSignal.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(TaskPriorityOrSignal)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
FromTaskPriority(TaskPriority)Creates a union value from a priority.
FromTaskSignal(TaskSignal)Creates a union value from a signal.
GetHashCode()Returns the hash code for this instance.
ToString()Returns the fully qualified type name of this instance.

Equals overloads

Equals(TaskPriorityOrSignal)

TaskSignal.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(TaskPriorityOrSignal other)
Parameters
other TaskPriorityOrSignal
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

TaskSignal.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

FromTaskPriority(TaskPriority)

TaskSignal.cs

Creates a union value from a priority.

public static TaskPriorityOrSignal FromTaskPriority(TaskPriority value)

Parameters

value TaskPriority

Returns

TaskPriorityOrSignal

FromTaskSignal(TaskSignal)

TaskSignal.cs

Creates a union value from a signal.

public static TaskPriorityOrSignal FromTaskSignal(TaskSignal value)

Parameters

value TaskSignal

Returns

TaskPriorityOrSignal

GetHashCode()

TaskSignal.cs

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

ToString()

TaskSignal.cs

Returns the fully qualified type name of this instance.

public override string? ToString()

Returns

string? The fully qualified type name.

Operators

NameDescription
operator ==(TaskPriorityOrSignal, TaskPriorityOrSignal)Returns whether the two unions hold equal values.
implicit operator TaskPriorityOrSignal(TaskPriority)Creates a union value from a priority.
implicit operator TaskPriorityOrSignal(TaskSignal)Creates a union value from a signal.
operator !=(TaskPriorityOrSignal, TaskPriorityOrSignal)Returns whether the two unions hold different values.

operator ==(TaskPriorityOrSignal, TaskPriorityOrSignal)

TaskSignal.cs

Returns whether the two unions hold equal values.

public static bool operator ==(TaskPriorityOrSignal left, TaskPriorityOrSignal right)

op_Implicit overloads

implicit operator TaskPriorityOrSignal(TaskPriority)

TaskSignal.cs

Creates a union value from a priority.

public static implicit operator TaskPriorityOrSignal(TaskPriority value)
Parameters
value TaskPriority
Returns

TaskPriorityOrSignal

implicit operator TaskPriorityOrSignal(TaskSignal)

TaskSignal.cs

Creates a union value from a signal.

public static implicit operator TaskPriorityOrSignal(TaskSignal value)
Parameters
value TaskSignal
Returns

TaskPriorityOrSignal

operator !=(TaskPriorityOrSignal, TaskPriorityOrSignal)

TaskSignal.cs

Returns whether the two unions hold different values.

public static bool operator !=(TaskPriorityOrSignal left, TaskPriorityOrSignal right)