[#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 FrostFS.Refs;
using Google.Protobuf;
@ -8,6 +10,11 @@ public static class ObjectIdMapper
{
public static ObjectID ToMessage(this FrostFsObjectId objectId)
{
if (objectId is null)
{
throw new ArgumentNullException(nameof(objectId));
}
return new ObjectID
{
Value = ByteString.CopyFrom(objectId.ToHash())
@ -16,6 +23,11 @@ public static class ObjectIdMapper
public static FrostFsObjectId ToModel(this ObjectID objectId)
{
if (objectId is null)
{
throw new ArgumentNullException(nameof(objectId));
}
return FrostFsObjectId.FromHash(objectId.Value.ToByteArray());
}
}