[#17] Client: Add extra parameter

API methods' parameters types with optional session, polling settings, xHeaders etc. and corresponding handlers have been added

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2024-07-18 15:08:53 +03:00 committed by p.gross
parent 00a1e9412f
commit 7b9c19f37c
42 changed files with 1054 additions and 386 deletions

View file

@ -13,6 +13,12 @@ public static class ObjectExtensions
return obj;
}
public static FrostFsObject SetPayload(this FrostFsObject obj, byte[] bytes)
{
obj.Payload = bytes;
return obj;
}
public static FrostFsObject AddAttribute(this FrostFsObject obj, string key, string value)
{
obj.AddAttribute(new ObjectAttribute(key, value));
@ -45,9 +51,6 @@ public static class ObjectExtensions
public static FrostFsObject CalculateObjectId(this FrostFsObject obj)
{
if (obj.Payload == null)
throw new MissingFieldException("Payload cannot be null");
if (obj.Header == null)
throw new MissingFieldException("Header cannot be null");