[#30] Client: Add object model for Rules
All checks were successful
DCO / DCO (pull_request) Successful in 27s
lint-build / dotnet8.0 (pull_request) Successful in 43s
lint-build / dotnet8.0 (push) Successful in 46s

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2025-02-12 04:20:01 +03:00
parent 43e300c773
commit 195854a45b
27 changed files with 677 additions and 155 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Linq;
namespace FrostFS.SDK.Client.Mappers.GRPC;
@ -13,6 +14,9 @@ public static class StatusMapper
return codeName is null
? throw new ArgumentException($"Unknown StatusCode. Value: '{status.Code}'.")
: new FrostFsResponseStatus((FrostFsStatusCode)status.Code, status.Message);
: new FrostFsResponseStatus(
(FrostFsStatusCode)status.Code,
status.Message,
string.Join(", ", status.Details.Select(d => System.Text.Encoding.UTF8.GetString([.. d.Value]))));
}
}