diff --git a/src/FrostFS.SDK.ClientV2/Services/Container.cs b/src/FrostFS.SDK.ClientV2/Services/Container.cs index 6e29a8f..fbd29a7 100644 --- a/src/FrostFS.SDK.ClientV2/Services/Container.cs +++ b/src/FrostFS.SDK.ClientV2/Services/Container.cs @@ -21,6 +21,7 @@ public partial class Client return response.Body.Container.ToModel(); } + //TODO: Return iterator public async Task ListContainersAsync() { var request = new ListRequest diff --git a/src/FrostFS.SDK.ClientV2/Services/Object.cs b/src/FrostFS.SDK.ClientV2/Services/Object.cs index 4136f28..8dbbe8a 100644 --- a/src/FrostFS.SDK.ClientV2/Services/Object.cs +++ b/src/FrostFS.SDK.ClientV2/Services/Object.cs @@ -132,7 +132,7 @@ public partial class Client using var stream = await PutObjectInit(request); var buffer = new byte[Constants.ObjectChunkSize]; - var bufferLength = payload.Read(buffer, 0, Constants.ObjectChunkSize); + var bufferLength = await payload.ReadAsync(buffer.AsMemory(0, Constants.ObjectChunkSize)); while (bufferLength > 0) { request.Body = new PutRequest.Types.Body @@ -142,7 +142,7 @@ public partial class Client request.VerifyHeader = null; request.Sign(_key); await stream.Write(request); - bufferLength = payload.Read(buffer, 0, Constants.ObjectChunkSize); + bufferLength = await payload.ReadAsync(buffer.AsMemory(0, Constants.ObjectChunkSize)); } var response = await stream.Close(); @@ -179,6 +179,7 @@ public partial class Client await _objectServiceClient.DeleteAsync(request); } + //TODO: Return iterator public async Task SearchObjectAsync(ContainerId cid, params ObjectFilter[] filters) { var request = new SearchRequest