Skip to content

StreamId Methods

Identifies a Stream within a provider

CompareTo(StreamId)

View source
public int CompareTo(StreamId other)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Parameters

otherStreamId
An object to compare with this instance.

Returns

A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Create(IStreamIdentity)

static
View source
public static StreamId Create(IStreamIdentity streamIdentity)
Initializes a new instance of the StreamId struct.

Parameters

streamIdentityIStreamIdentity
The stream identity.

Equals(StreamId)

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

Parameters

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

GetNamespace

View source
public string? GetNamespace()
Returns the StreamId component of this instance as a string.

Returns

The namespace component of this instance.

GetObjectData(SerializationInfo, StreamingContext)

View source
public void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

Parameters

infoSerializationInfo
The System.Runtime.Serialization.SerializationInfo to populate with data.
contextStreamingContext
The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

Exceptions

System.Security.SecurityException
The caller does not have the required permission.

Parse(ReadOnlySpan<byte>)

static
View source
public static StreamId Parse(ReadOnlySpan<byte> value)
Parses a StreamId instance from a System.String.

Parameters

valueReadOnlySpan<byte>
The UTF-8 encoded value.

Returns

The parsed stream identity.

ToString

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

Returns

The fully qualified type name.

operator ==(StreamId, StreamId)

static
View source
public static bool operator ==(StreamId s1, StreamId s2)
Compares two StreamId instances for equality.

Parameters

s1StreamId
The first stream identity.
s2StreamId
The second stream identity.

Returns

The result of the operator.

operator !=(StreamId, StreamId)

static
View source
public static bool operator !=(StreamId s1, StreamId s2)
Compares two StreamId instances for equality.

Parameters

s1StreamId
The first stream identity.
s2StreamId
The second stream identity.

Returns

The result of the operator.