[#1] Optimize imports

Signed-off-by: Ivan Pchelintsev <i.pchelintsev@yadro.com>
This commit is contained in:
Ivan Pchelintsev 2024-05-16 11:00:30 +03:00
parent 11eff4e23e
commit 0d83541d82
20 changed files with 61 additions and 40 deletions

View file

@ -2,6 +2,7 @@ using FrostFS.Object;
using FrostFS.Refs;
using FrostFS.SDK.ClientV2.Mappers.GRPC;
using FrostFS.SDK.Cryptography;
using FrostFS.SDK.ModelsV2;
using FrostFS.Session;
using Google.Protobuf;
using Grpc.Core;
@ -56,8 +57,8 @@ public partial class Client
request.Sign(_key);
using var stream = await InitObject(request);
var buffer = new byte[ModelsV2.Constants.ObjectChunkSize];
var bufferLength = data.Read(buffer, 0, ModelsV2.Constants.ObjectChunkSize);
var buffer = new byte[Constants.ObjectChunkSize];
var bufferLength = data.Read(buffer, 0, Constants.ObjectChunkSize);
while (bufferLength > 0)
{
request.Body = new PutRequest.Types.Body
@ -67,7 +68,7 @@ public partial class Client
request.VerifyHeader = null;
request.Sign(_key);
await stream.Write(request);
bufferLength = data.Read(buffer, 0, ModelsV2.Constants.ObjectChunkSize);
bufferLength = data.Read(buffer, 0, Constants.ObjectChunkSize);
}
return await stream.Close();
}