Skip to main content

CkOperation

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

One operation of an asynchronous CK method as runtime.operations returns it.

public sealed class CkOperation

Inheritance Object → CkOperation

Properties​

OperationId​

The opaque id of the operation (the handle).

public string OperationId { get; }

Property Value​

String

MethodId​

The qualified, model-version-less id of the method, e.g. System.Bot/TenantRepository.Dump-1.

public string MethodId { get; }

Property Value​

String

InvocationId​

The id of the invocation that started the operation (correlation with the handler log).

public string InvocationId { get; }

Property Value​

String

State​

The current state.

public CkOperationState State { get; }

Property Value​

CkOperationState

StateName​

The state as the service sent it (e.g. RUNNING); kept for states this client does not know.

public string StateName { get; }

Property Value​

String

IsFinal​

true for CkOperationState.Succeeded and CkOperationState.Failed; a final operation never changes again.

public bool IsFinal { get; }

Property Value​

Boolean

Progress​

The last progress report; null when the handler reported none.

public CkOperationProgress Progress { get; }

Property Value​

CkOperationProgress

Result​

The result of a succeeded operation of a method with a result, in the JSON form of the method result; always null for a result the CK model marks sensitive. Read it typed with CkOperationHandle<TResult>.ReadResult(CkOperation).

public Nullable<JsonElement> Result { get; }

Property Value​

Nullable<JsonElement>

Error​

The error of a failed operation: a platform code (METHOD_*, e.g. METHOD_OUTCOME_UNKNOWN with reason = handler-lost) or a code the method declares.

public CkMethodError Error { get; }

Property Value​

CkMethodError

AcceptedAtUtc​

The time (UTC) the operation was accepted.

public Nullable<DateTime> AcceptedAtUtc { get; }

Property Value​

Nullable<DateTime>

StartedAtUtc​

The time (UTC) the handler started the work.

public Nullable<DateTime> StartedAtUtc { get; }

Property Value​

Nullable<DateTime>

CompletedAtUtc​

The time (UTC) the operation became final.

public Nullable<DateTime> CompletedAtUtc { get; }

Property Value​

Nullable<DateTime>

ExpiresAtUtc​

The time (UTC) after which the operation is forgotten; null while it is open.

public Nullable<DateTime> ExpiresAtUtc { get; }

Property Value​

Nullable<DateTime>

Constructors​

CkOperation(String, String, String, CkOperationState, String, CkOperationProgress, Nullable<JsonElement>, CkMethodError, Nullable<DateTime>, Nullable<DateTime>, Nullable<DateTime>, Nullable<DateTime>)​

Creates the operation.

public CkOperation(string operationId, string methodId, string invocationId, CkOperationState state, string stateName, CkOperationProgress progress, Nullable<JsonElement> result, CkMethodError error, Nullable<DateTime> acceptedAtUtc, Nullable<DateTime> startedAtUtc, Nullable<DateTime> completedAtUtc, Nullable<DateTime> expiresAtUtc)

Parameters​

operationId String
The opaque id of the operation

methodId String
The qualified, model-version-less id of the method

invocationId String
The id of the invocation that started it

state CkOperationState
The current state

stateName String
The state as the service sent it (e.g. RUNNING)

progress CkOperationProgress
The last progress report; null when none was reported

result Nullable<JsonElement>
The result of a succeeded operation (JSON); null when there is none

error CkMethodError
The error of a failed operation; null otherwise

acceptedAtUtc Nullable<DateTime>
The time (UTC) the operation was accepted

startedAtUtc Nullable<DateTime>
The time (UTC) the handler started the work

completedAtUtc Nullable<DateTime>
The time (UTC) the operation became final

expiresAtUtc Nullable<DateTime>
The time (UTC) after which the operation is forgotten