[#26] All: Remove V2 from naming
Rename project, namespaces and class names Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
c406df1a78
commit
766f61a5f7
219 changed files with 219 additions and 974 deletions
41
src/FrostFS.SDK.Client/Models/Chain/FrostFsChain.cs
Normal file
41
src/FrostFS.SDK.Client/Models/Chain/FrostFsChain.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using Google.Protobuf;
|
||||
|
||||
namespace FrostFS.SDK.Client;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue