Skip to content

TaskId Methods

Identifies a durable task within a hierarchy.

Child(string)

View source
public TaskId Child(string segment)
Creates a child identifier by appending one logical segment.

Parameters

segmentstring

Exceptions

System.ArgumentException
segment is null, empty, or contains an unpaired UTF-16 surrogate.

CreateRoot(string)

static
View source
public static TaskId CreateRoot(string rootSegment)
Creates a root identifier from one logical segment.

Parameters

rootSegmentstring

Exceptions

System.ArgumentException
rootSegment is null, empty, or contains an unpaired UTF-16 surrogate.

Equals(TaskId)

View source
public bool Equals(TaskId other)
Indicates whether the current object is equal to another object of the same type.

Parameters

otherTaskId
An object to compare with this object.

Returns

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

Equals(object?)

override
View source
public override bool Equals(object? obj)
Indicates whether this instance and a specified object are equal.

Parameters

objobject?
The object to compare with the current instance.

Returns

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

GetHashCode

override
View source
public override int GetHashCode()
Returns the hash code for this instance.

Returns

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

IsAncestorOf(TaskId)

View source
public bool IsAncestorOf(TaskId other)
Returns whether this non-empty identifier is an ancestor of or equal to other. TaskId is outside the hierarchy and returns false.

Parameters

otherTaskId

IsDescendantOf(TaskId)

View source
public bool IsDescendantOf(TaskId other)
Returns whether this non-empty identifier is a descendant of or equal to other. TaskId is outside the hierarchy and returns false.

Parameters

otherTaskId

ToString

override
View source
public override string ToString()
Formats this identifier as an escaped hierarchical path.