From 14dc76898e8e0a3fcdc1b0e08c6de3dcd8786264 Mon Sep 17 00:00:00 2001 From: Pavel Gross Date: Thu, 14 Nov 2024 11:24:14 +0300 Subject: [PATCH] [#25] Client Implement PAtch and Range methods Fix the specific type in interfaces Signed-off-by: Pavel Gross --- src/FrostFS.SDK.ClientV2/FrostFSClient.cs | 2 +- src/FrostFS.SDK.ClientV2/Interfaces/IFrostFSClient.cs | 2 +- src/FrostFS.SDK.ClientV2/Pool/Pool.cs | 2 +- src/FrostFS.SDK.ClientV2/Services/ObjectServiceProvider.cs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FrostFS.SDK.ClientV2/FrostFSClient.cs b/src/FrostFS.SDK.ClientV2/FrostFSClient.cs index 830eb94..a7bfff4 100644 --- a/src/FrostFS.SDK.ClientV2/FrostFSClient.cs +++ b/src/FrostFS.SDK.ClientV2/FrostFSClient.cs @@ -294,7 +294,7 @@ public class FrostFSClient : IFrostFSClient return service.GetRangeAsync(args); } - public Task>> GetRangeHashAsync(PrmRangeHashGet args) + public Task[]> GetRangeHashAsync(PrmRangeHashGet args) { if (args is null) throw new ArgumentNullException(nameof(args)); diff --git a/src/FrostFS.SDK.ClientV2/Interfaces/IFrostFSClient.cs b/src/FrostFS.SDK.ClientV2/Interfaces/IFrostFSClient.cs index 48ab8e8..8e4bae4 100644 --- a/src/FrostFS.SDK.ClientV2/Interfaces/IFrostFSClient.cs +++ b/src/FrostFS.SDK.ClientV2/Interfaces/IFrostFSClient.cs @@ -44,7 +44,7 @@ public interface IFrostFSClient : IDisposable Task GetRangeAsync(PrmRangeGet args); - Task>> GetRangeHashAsync(PrmRangeHashGet args); + Task[]> GetRangeHashAsync(PrmRangeHashGet args); Task PutObjectAsync(PrmObjectPut args); diff --git a/src/FrostFS.SDK.ClientV2/Pool/Pool.cs b/src/FrostFS.SDK.ClientV2/Pool/Pool.cs index 9e34551..00abda2 100644 --- a/src/FrostFS.SDK.ClientV2/Pool/Pool.cs +++ b/src/FrostFS.SDK.ClientV2/Pool/Pool.cs @@ -738,7 +738,7 @@ public partial class Pool : IFrostFSClient return await client.Client!.GetRangeAsync(args).ConfigureAwait(false); } - public async Task>> GetRangeHashAsync(PrmRangeHashGet args) + public async Task[]> GetRangeHashAsync(PrmRangeHashGet args) { if (args is null) { diff --git a/src/FrostFS.SDK.ClientV2/Services/ObjectServiceProvider.cs b/src/FrostFS.SDK.ClientV2/Services/ObjectServiceProvider.cs index bb742a5..322fb3e 100644 --- a/src/FrostFS.SDK.ClientV2/Services/ObjectServiceProvider.cs +++ b/src/FrostFS.SDK.ClientV2/Services/ObjectServiceProvider.cs @@ -150,7 +150,7 @@ internal sealed class ObjectServiceProvider(ObjectService.ObjectServiceClient cl return new RangeReader(call); } - internal async Task>> GetRangeHashAsync(PrmRangeHashGet args) + internal async Task[]> GetRangeHashAsync(PrmRangeHashGet args) { var ctx = args.Context!; @@ -197,7 +197,7 @@ internal sealed class ObjectServiceProvider(ObjectService.ObjectServiceClient cl Verifier.CheckResponse(response); - var hashCollection = response.Body.HashList.ToArray().Select(h => h.Memory); + var hashCollection = response.Body.HashList.Select(h => h.Memory).ToArray(); return hashCollection; }