[#25] Client Implement PAtch and Range methods

Fix the specific type in interfaces

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2024-11-14 11:24:14 +03:00
parent 003b7fdfdd
commit 14dc76898e
4 changed files with 5 additions and 5 deletions

View file

@ -294,7 +294,7 @@ public class FrostFSClient : IFrostFSClient
return service.GetRangeAsync(args);
}
public Task<IEnumerable<ReadOnlyMemory<byte>>> GetRangeHashAsync(PrmRangeHashGet args)
public Task<ReadOnlyMemory<byte>[]> GetRangeHashAsync(PrmRangeHashGet args)
{
if (args is null)
throw new ArgumentNullException(nameof(args));

View file

@ -44,7 +44,7 @@ public interface IFrostFSClient : IDisposable
Task<RangeReader> GetRangeAsync(PrmRangeGet args);
Task<IEnumerable<ReadOnlyMemory<byte>>> GetRangeHashAsync(PrmRangeHashGet args);
Task<ReadOnlyMemory<byte>[]> GetRangeHashAsync(PrmRangeHashGet args);
Task<FrostFsObjectId> PutObjectAsync(PrmObjectPut args);

View file

@ -738,7 +738,7 @@ public partial class Pool : IFrostFSClient
return await client.Client!.GetRangeAsync(args).ConfigureAwait(false);
}
public async Task<IEnumerable<ReadOnlyMemory<byte>>> GetRangeHashAsync(PrmRangeHashGet args)
public async Task<ReadOnlyMemory<byte>[]> GetRangeHashAsync(PrmRangeHashGet args)
{
if (args is null)
{

View file

@ -150,7 +150,7 @@ internal sealed class ObjectServiceProvider(ObjectService.ObjectServiceClient cl
return new RangeReader(call);
}
internal async Task<IEnumerable<ReadOnlyMemory<byte>>> GetRangeHashAsync(PrmRangeHashGet args)
internal async Task<ReadOnlyMemory<byte>[]> 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;
}