[#28] Client: Apply code optimizations
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
766f61a5f7
commit
749000a090
57 changed files with 845 additions and 1116 deletions
|
@ -8,13 +8,8 @@ public class FrostFsObjectId(string id)
|
|||
{
|
||||
public string Value { get; } = id;
|
||||
|
||||
public static FrostFsObjectId FromHash(byte[] hash)
|
||||
public static FrostFsObjectId FromHash(ReadOnlySpan<byte> hash)
|
||||
{
|
||||
if (hash is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(hash));
|
||||
}
|
||||
|
||||
if (hash.Length != Constants.Sha256HashLength)
|
||||
throw new FormatException("ObjectID must be a sha256 hash.");
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ using FrostFS.Refs;
|
|||
using FrostFS.SDK.Client.Mappers.GRPC;
|
||||
using FrostFS.SDK.Cryptography;
|
||||
|
||||
|
||||
namespace FrostFS.SDK;
|
||||
|
||||
public class FrostFsOwner(string id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue