Skip to content

JournalId Methods

Identifies a journal independently of any grain activation.

Create(IEnumerable<string>)

static
View source
public static JournalId Create(IEnumerable<string> segments)
Creates a journal id from decoded hierarchical segments.

Parameters

segmentsIEnumerable<string>
The id segments.

Returns

The normalized journal id.

Create(ReadOnlySpan<string>)

static
View source
public static JournalId Create(ReadOnlySpan<string> segments)
Creates a journal id from decoded hierarchical segments.

Parameters

segmentsReadOnlySpan<string>
The id segments.

Returns

The normalized journal id.

Create(string, ReadOnlySpan<string>)

static
View source
public static JournalId Create(string firstSegment, params ReadOnlySpan<string> additionalSegments)
Creates a journal id from decoded hierarchical segments.

Parameters

firstSegmentstring
The first id segment.
additionalSegmentsReadOnlySpan<string>
Additional id segments.

Returns

The normalized journal id.

Equals(JournalId)

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

Parameters

otherJournalId
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.

FromGrainId(GrainId)

static
View source
public static JournalId FromGrainId(GrainId grainId)
Creates a journal id from a grain id.

Parameters

grainIdGrainId
The grain id.

Returns

The journal id.

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.

IsPrefixOf(JournalId)

View source
public bool IsPrefixOf(JournalId journalId)
Determines whether this id is a prefix of journalId.

Parameters

journalIdJournalId
The journal id to test.

Returns

true if this id is the default value, equals journalId, or identifies an ancestor segment.

ToString

override
View source
public override string ToString()
Returns the fully qualified type name of this instance.

Returns

The fully qualified type name.

operator ==(JournalId, JournalId)

static
View source
public static bool operator ==(JournalId left, JournalId right)
Compares two journal ids for equality.

Parameters

leftJournalId
The first journal id.
rightJournalId
The second journal id.

Returns

true if the journal ids are equal; otherwise, false.

operator !=(JournalId, JournalId)

static
View source
public static bool operator !=(JournalId left, JournalId right)
Compares two journal ids for inequality.

Parameters

leftJournalId
The first journal id.
rightJournalId
The second journal id.

Returns

true if the journal ids are not equal; otherwise, false.