[#13] Client: Use code analyzers

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2024-09-23 18:53:21 +03:00
parent d7dbbf8da8
commit d1271df207
102 changed files with 2168 additions and 733 deletions

View file

@ -1,3 +1,5 @@
using System;
using Google.Protobuf;
namespace FrostFS.SDK.ClientV2;
@ -6,8 +8,13 @@ public static class SessionMapper
{
public static byte[] Serialize(this Session.SessionToken token)
{
if (token is null)
{
throw new ArgumentNullException(nameof(token));
}
byte[] bytes = new byte[token.CalculateSize()];
CodedOutputStream stream = new(bytes);
using CodedOutputStream stream = new(bytes);
token.WriteTo(stream);
return bytes;