Show / Hide Table of Contents

Struct ClusterMemberId

Represents unique identifier of cluster member.

Implements
IEquatable<ClusterMemberId>
IBinaryFormattable<ClusterMemberId>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext.Net.Cluster
Assembly: DotNext.Net.Cluster.dll
Syntax
public readonly struct ClusterMemberId : IEquatable<ClusterMemberId>, IBinaryFormattable<ClusterMemberId>

Constructors

| Edit this page View Source

ClusterMemberId(Random)

Initializes a new random unique identifier.

Declaration
public ClusterMemberId(Random random)
Parameters
Type Name Description
Random random

The source of random values.

Exceptions
Type Condition
ArgumentNullException

random is null.

| Edit this page View Source

ClusterMemberId(ReadOnlySpan<byte>)

Initializes a new unique identifier from set of bytes.

Declaration
public ClusterMemberId(ReadOnlySpan<byte> bytes)
Parameters
Type Name Description
ReadOnlySpan<byte> bytes

The memory block of bytes.

Exceptions
Type Condition
ArgumentOutOfRangeException

bytes is too small.

Properties

| Edit this page View Source

Size

Gets size of this type, in bytes.

Declaration
public static int Size { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

Equals(ClusterMemberId)

Determines whether the current identifier is equal to another identifier.

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

The identifier to compare.

Returns
Type Description
bool

true if this identifier is equal to other; otherwise, false.

| Edit this page View Source

Equals(object?)

Determines whether the current identifier is equal to another identifier.

Declaration
public override bool Equals(object? other)
Parameters
Type Name Description
object other

The identifier to compare.

Returns
Type Description
bool

true if this identifier is equal to other; otherwise, false.

Overrides
ValueType.Equals(object)
| Edit this page View Source

Format(Span<byte>)

Serializes the value as a sequence of bytes.

Declaration
public void Format(Span<byte> output)
Parameters
Type Name Description
Span<byte> output

The output buffer.

| Edit this page View Source

FromEndPoint(EndPoint?)

Constructs cluster member id from its endpoint address.

Declaration
public static ClusterMemberId FromEndPoint(EndPoint? ep)
Parameters
Type Name Description
EndPoint ep

The address of the cluster member.

Returns
Type Description
ClusterMemberId

The identifier of the cluster member.

| Edit this page View Source

GetHashCode()

Gets the hash code of this identifier.

Declaration
public override int GetHashCode()
Returns
Type Description
int

The hash code of this identifier.

Overrides
ValueType.GetHashCode()
| Edit this page View Source

ToString()

Returns hexadecimal representation of this identifier.

Declaration
public override string ToString()
Returns
Type Description
string

The hexadecimal representation of this identifier.

Overrides
ValueType.ToString()
| Edit this page View Source

TryParse(ReadOnlySpan<char>, out ClusterMemberId)

Attempts to parse cluster member identifier.

Declaration
public static bool TryParse(ReadOnlySpan<char> identifier, out ClusterMemberId value)
Parameters
Type Name Description
ReadOnlySpan<char> identifier

The hexadecimal representation of identifier.

ClusterMemberId value

The parsed identifier.

Returns
Type Description
bool

true if identifier parsed successfully; otherwise, false.

| Edit this page View Source

TryParse(string?, out ClusterMemberId)

Attempts to parse cluster member identifier.

Declaration
public static bool TryParse(string? identifier, out ClusterMemberId value)
Parameters
Type Name Description
string identifier

The hexadecimal representation of identifier.

ClusterMemberId value

The parsed identifier.

Returns
Type Description
bool

true if identifier parsed successfully; otherwise, false.

Operators

| Edit this page View Source

operator ==(in ClusterMemberId, in ClusterMemberId)

Determines whether the two identifiers are equal.

Declaration
public static bool operator ==(in ClusterMemberId x, in ClusterMemberId y)
Parameters
Type Name Description
ClusterMemberId x

The first identifier to compare.

ClusterMemberId y

The second identifier to compare.

Returns
Type Description
bool

true if both identifiers are equal; otherwise, false.

| Edit this page View Source

operator !=(in ClusterMemberId, in ClusterMemberId)

Determines whether the two identifiers are not equal.

Declaration
public static bool operator !=(in ClusterMemberId x, in ClusterMemberId y)
Parameters
Type Name Description
ClusterMemberId x

The first identifier to compare.

ClusterMemberId y

The second identifier to compare.

Returns
Type Description
bool

true if both identifiers are not equal; otherwise, false.

Implements

IEquatable<T>
IBinaryFormattable<TSelf>

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
Collection.ToAsyncEnumerator<TEnumerator, T>(TEnumerator, CancellationToken)
Collection.ToClassicEnumerator<TEnumerator, T>(TEnumerator)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
ExpressionBuilder.Const<T>(T)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾