Table of Contents

Struct ChannelId

Namespace
NLightning.Domain.ValueObjects
Assembly
NLightning.Domain.dll

Represents a channel id.

public readonly struct ChannelId : IValueObject, IEquatable<ChannelId>
Implements
Inherited Members

Remarks

The channel id is a unique identifier for a channel.

Constructors

ChannelId(ReadOnlySpan<byte>)

public ChannelId(ReadOnlySpan<byte> value)

Parameters

value ReadOnlySpan<byte>

Fields

LENGTH

public const int LENGTH = 32

Field Value

int

Properties

Zero

public static ChannelId Zero { get; }

Property Value

ChannelId

Methods

Equals(ChannelId)

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

public bool Equals(ChannelId other)

Parameters

other ChannelId

An object to compare with this object.

Returns

bool

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

Equals(object?)

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.

GetHashCode()

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.

Operators

operator ==(ChannelId, ChannelId)

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

Parameters

left ChannelId
right ChannelId

Returns

bool

implicit operator byte[](ChannelId)

public static implicit operator byte[](ChannelId c)

Parameters

c ChannelId

Returns

byte[]

implicit operator ReadOnlyMemory<byte>(ChannelId)

public static implicit operator ReadOnlyMemory<byte>(ChannelId c)

Parameters

c ChannelId

Returns

ReadOnlyMemory<byte>

implicit operator ChannelId(byte[])

public static implicit operator ChannelId(byte[] value)

Parameters

value byte[]

Returns

ChannelId

implicit operator ChannelId(Span<byte>)

public static implicit operator ChannelId(Span<byte> value)

Parameters

value Span<byte>

Returns

ChannelId

operator !=(ChannelId, ChannelId)

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

Parameters

left ChannelId
right ChannelId

Returns

bool