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
InvocationId
The invocation id of a successful call, for correlation with the handler log; null for a failure.
public string InvocationId { get; }
Property Value
Error
The declared error of a failed call; null for a success.
public CkMethodError Error { get; }
Property Value
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
Failure(CkMethodError)
A call that failed with a declared error.
public static CkMethodResult<TValue> Failure(CkMethodError error)
Parameters
error CkMethodError
The declared error