[#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,35 +1,35 @@
|
|||
using FrostFS.SDK.Cryptography;
|
||||
using System;
|
||||
|
||||
using FrostFS.SDK.Cryptography;
|
||||
|
||||
using Google.Protobuf;
|
||||
|
||||
using System;
|
||||
|
||||
namespace FrostFS.SDK;
|
||||
|
||||
public class SplitId
|
||||
{
|
||||
private readonly Guid id;
|
||||
|
||||
private ByteString? _message;
|
||||
private ByteString? message;
|
||||
|
||||
public SplitId()
|
||||
{
|
||||
id = Guid.NewGuid();
|
||||
this.id = Guid.NewGuid();
|
||||
}
|
||||
|
||||
public SplitId(Guid guid)
|
||||
public SplitId(Guid id)
|
||||
{
|
||||
id = guid;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
private SplitId(byte[] binary)
|
||||
{
|
||||
id = new Guid(binary);
|
||||
this.id = new Guid(binary);
|
||||
}
|
||||
|
||||
private SplitId(string str)
|
||||
{
|
||||
id = new Guid(str);
|
||||
this.id = new Guid(str);
|
||||
}
|
||||
|
||||
public static SplitId CreateFromBinary(byte[] binaryData)
|
||||
|
@ -44,19 +44,19 @@ public class SplitId
|
|||
|
||||
public override string ToString()
|
||||
{
|
||||
return id.ToString();
|
||||
return this.id.ToString();
|
||||
}
|
||||
|
||||
public byte[]? ToBinary()
|
||||
{
|
||||
if (id == Guid.Empty)
|
||||
if (this.id == Guid.Empty)
|
||||
return null;
|
||||
|
||||
return id.ToBytes();
|
||||
return this.id.ToBytes();
|
||||
}
|
||||
|
||||
public ByteString? GetSplitId()
|
||||
{
|
||||
return _message ??= ByteString.CopyFrom(ToBinary());
|
||||
return this.message ??= ByteString.CopyFrom(ToBinary());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue