CkMethodResult
Namespace: Meshmakers.Octo.Sdk.ServiceClient.AssetRepositoryServices.Tenants.Methods
The outcome of a CK method call through a generated method client: either a success with the invocation id, or one of the errors the method declares in its CK model. Every other failure (authorization, validation, timeout, transport) is thrown, see CkMethodCallException.
public class CkMethodResult
Inheritance Object → CkMethodResult
Properties
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
IsError(String)
true when the call failed with the declared error code.
public bool IsError(string code)
Parameters
code String
A declared error code, e.g. a constant of the generated …Errors class
Returns
Success(String)
A successful call of a method without result.
public static CkMethodResult Success(string invocationId)
Parameters
invocationId String
The invocation id
Returns
Failure(CkMethodError)
A call that failed with a declared error.
public static CkMethodResult Failure(CkMethodError error)
Parameters
error CkMethodError
The declared error