[#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

@ -52,15 +52,9 @@ public class FrostFsService
return getObjectHeadResponse.Body.Header.Header.ToModel();
}
public async Task<ObjectId> PutObjectAsync(ContainerId containerId, Stream data)
public async Task<ObjectId> PutObjectAsync(ModelsV2.Object obj)
{
var putObjectResponse = await _client.PutObjectAsync(containerId.ToGrpcMessage(), data);
return ObjectId.FromHash(putObjectResponse.Body.ObjectId.Value.ToByteArray());
}
public async Task<ObjectId> PutObjectAsync(ContainerId containerId, byte[] data)
{
var putObjectResponse = await _client.PutObjectAsync(containerId.ToGrpcMessage(), new MemoryStream(data));
var putObjectResponse = await _client.PutObjectAsync(obj.ContainerId.ToGrpcMessage(), obj.Payload);
return ObjectId.FromHash(putObjectResponse.Body.ObjectId.Value.ToByteArray());
}