[#14] Add interceptors

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2024-07-01 11:56:47 +03:00 committed by p.gross
parent 605463ec24
commit ae67b12313
28 changed files with 943 additions and 554 deletions

View file

@ -2,17 +2,17 @@
using System;
using Google.Protobuf;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
namespace FrostFS.SDK.ClientV2;
public static class SessionMapper
{
internal static string SerializeSessionToken(this Session.SessionToken token)
internal static byte[] Serialize(this Session.SessionToken token)
{
byte[] bytes = new byte[token.CalculateSize()];
CodedOutputStream stream = new(bytes);
token.WriteTo(stream);
return Convert.ToBase64String(bytes);
return bytes;
}
internal static Session.SessionToken DeserializeSessionToken(this byte[] bytes)