[#3] Move to netstandard 2.0

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
p.gross 2024-05-29 12:43:00 +03:00
parent ae3fc419a4
commit 0c4723c705
55 changed files with 2508 additions and 1818 deletions

View file

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Grpc.Core;
using FrostFS.Object;
using FrostFS.Refs;
namespace FrostFS.SDK.ClientV2;
internal class SearchReader(AsyncServerStreamingCall<SearchResponse> call) : IDisposable
{
public AsyncServerStreamingCall<SearchResponse> Call { get; private set; } = call;
public async Task<List<ObjectID>?> Read()
{
if (!await Call.ResponseStream.MoveNext())
{
return null;
}
var response = Call.ResponseStream.Current;
Verifier.CheckResponse(response);
return response.Body?.IdList.ToList();
}
public void Dispose()
{
Call.Dispose();
}
}