All checks were successful
DCO / DCO (pull_request) Successful in 35s
Signed-off-by: Pavel Gross <p.gross@yadro.com>
42 lines
999 B
C#
42 lines
999 B
C#
using Google.Protobuf;
|
|
|
|
namespace FrostFS.SDK.ClientV2
|
|
{
|
|
public struct FrostFsChain(byte[] raw) : System.IEquatable<FrostFsChain>
|
|
{
|
|
private ByteString? grpcRaw;
|
|
|
|
public byte[] Raw { get; } = raw;
|
|
|
|
internal ByteString GetRaw()
|
|
{
|
|
return grpcRaw ??= ByteString.CopyFrom(Raw);
|
|
}
|
|
|
|
public override readonly bool Equals(object obj)
|
|
{
|
|
var chain = (FrostFsChain)obj;
|
|
return Equals(chain);
|
|
}
|
|
|
|
public override readonly int GetHashCode()
|
|
{
|
|
return Raw.GetHashCode();
|
|
}
|
|
|
|
public static bool operator ==(FrostFsChain left, FrostFsChain right)
|
|
{
|
|
return left.Equals(right);
|
|
}
|
|
|
|
public static bool operator !=(FrostFsChain left, FrostFsChain right)
|
|
{
|
|
return !(left == right);
|
|
}
|
|
|
|
public readonly bool Equals(FrostFsChain other)
|
|
{
|
|
return Raw == other.Raw;
|
|
}
|
|
}
|
|
}
|