[#13] Client: Use code analyzers
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
d7dbbf8da8
commit
d1271df207
102 changed files with 2168 additions and 733 deletions
|
@ -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());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue