[#11] Add Network Snapshot
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
b69d22966f
commit
c988ff3c76
84 changed files with 2238 additions and 933 deletions
21
src/FrostFS.SDK.ClientV2/Mappers/OwnerId.cs
Normal file
21
src/FrostFS.SDK.ClientV2/Mappers/OwnerId.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using FrostFS.Refs;
|
||||
using FrostFS.SDK.ModelsV2;
|
||||
using Google.Protobuf;
|
||||
|
||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
||||
|
||||
public static class OwnerIdMapper
|
||||
{
|
||||
public static OwnerID ToGrpcMessage(this OwnerId ownerId)
|
||||
{
|
||||
return new OwnerID
|
||||
{
|
||||
Value = ByteString.CopyFrom(ownerId.ToHash())
|
||||
};
|
||||
}
|
||||
|
||||
public static OwnerId ToModel(this OwnerID ownerId)
|
||||
{
|
||||
return new OwnerId(ownerId.ToString());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue