Skip to main content

CkMethodResult<TValue>

Namespace: Meshmakers.Octo.Sdk.ServiceClient.AssetRepositoryServices.Tenants.Methods

The outcome of a CK method call with a declared result, see CkMethodResult.

public sealed class CkMethodResult<TValue> : CkMethodResult

Type Parameters​

TValue
The C# type of the declared result

Inheritance Object → CkMethodResult → CkMethodResult<TValue>

Properties​

Value​

The declared result of a successful call; default for a failure. The client of an asynchronous method (execution.mode: async) returns a CkOperationHandle here; its result is read with CkOperationsClient.WaitForOperationAsync<TResult>(CkOperationHandle<TResult>, IProgress<CkOperation>, CkOperationWaitOptions, CancellationToken).

public TValue Value { get; }

Property Value​

TValue

IsSuccess​

true when the method ran successfully.

public bool IsSuccess { get; }

Property Value​

Boolean

InvocationId​

The invocation id of a successful call, for correlation with the handler log; null for a failure.

public string InvocationId { get; }

Property Value​

String

Error​

The declared error of a failed call; null for a success.

public CkMethodError Error { get; }

Property Value​

CkMethodError

Methods​

Success(String, TValue)​

A successful call.

public static CkMethodResult<TValue> Success(string invocationId, TValue value)

Parameters​

invocationId String
The invocation id

value TValue
The declared result

Returns​

CkMethodResult<TValue>

Failure(CkMethodError)​

A call that failed with a declared error.

public static CkMethodResult<TValue> Failure(CkMethodError error)

Parameters​

error CkMethodError
The declared error

Returns​

CkMethodResult<TValue>