Initial SDK structure #1

Merged
i.pchelintsev merged 18 commits from i.pchelintsev/frostfs-sdk-csharp:master into master 2024-09-04 19:51:24 +00:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 70ba87bc60 - Show all commits

View file

@ -21,6 +21,7 @@ public partial class Client
return response.Body.Container.ToModel();
}
//TODO: Return iterator
public async Task<ContainerId[]> ListContainersAsync()
{
var request = new ListRequest

View file

@ -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<ObjectId[]> SearchObjectAsync(ContainerId cid, params ObjectFilter[] filters)
{
var request = new SearchRequest