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
Properties
Zero
public static ChannelId Zero { get; }
Property Value
Methods
Equals(ChannelId)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ChannelId other)
Parameters
other
ChannelIdAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe 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
Returns
implicit operator byte[](ChannelId)
public static implicit operator byte[](ChannelId c)
Parameters
Returns
- byte[]
implicit operator ReadOnlyMemory<byte>(ChannelId)
public static implicit operator ReadOnlyMemory<byte>(ChannelId c)
Parameters
Returns
implicit operator ChannelId(byte[])
public static implicit operator ChannelId(byte[] value)
Parameters
value
byte[]
Returns
implicit operator ChannelId(Span<byte>)
public static implicit operator ChannelId(Span<byte> value)
Parameters
Returns
operator !=(ChannelId, ChannelId)
public static bool operator !=(ChannelId left, ChannelId right)