[#28] Clients: Make immutable parameters
All checks were successful
lint-build / dotnet8.0 (pull_request) Successful in 55s
DCO / DCO (pull_request) Successful in 1m4s
lint-build / dotnet8.0 (push) Successful in 1m13s

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2024-12-02 19:33:45 +03:00
parent 749000a090
commit 9bb7b5eff8
62 changed files with 2742 additions and 963 deletions

View file

@ -11,16 +11,6 @@ namespace FrostFS.SDK.Client;
internal static class ObjectTools
{
internal static FrostFsObjectId CalculateObjectId(FrostFsObjectHeader header, ClientContext ctx)
{
var grpcHeader = CreateHeader(header, [], ctx);
if (header.Split != null)
SetSplitValues(grpcHeader, header.Split, ctx);
return new ObjectID { Value = grpcHeader.Sha256() }.ToModel();
}
internal static Object.Object CreateObject(FrostFsObject @object, ClientContext ctx)
{
@object.Header.OwnerId ??= ctx.Owner;