[#28] Client: add method to calculate ObjectId

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2024-12-09 23:54:50 +03:00 committed by PavelGrossSpb
parent abd9b5d0d0
commit 543247e4d9
6 changed files with 55 additions and 13 deletions

View file

@ -290,6 +290,14 @@ public class FrostFSClient : IFrostFSClient
{
return GetObjectService().SearchObjectsAsync(args, ctx);
}
public FrostFsObjectId CalculateObjectId(FrostFsObjectHeader header)
{
if (header == null)
throw new ArgumentNullException(nameof(header));
return ObjectTools.CalculateObjectId(header, ClientCtx.Owner, ClientCtx.Version, ClientCtx.Key);
}
#endregion
#region Session Implementation