CkOperationHandle
Namespace: Meshmakers.Octo.Sdk.ServiceClient.AssetRepositoryServices.Tenants.Methods
The handle of an accepted call of an asynchronous CK method (execution.mode: async). The call
returns at once; state, progress and the result are read later with CkOperationsClient
(CkOperationsClient.GetOperationAsync(String, CancellationToken), CkOperationsClient.WaitForOperationAsync(CkOperationHandle, IProgress<CkOperation>, CkOperationWaitOptions, CancellationToken)).
The wire fields follow the method wire contract: operationId, acceptedAtUtc,
retryAfterSeconds, expiresAtUtc.
public class CkOperationHandle
Inheritance Object → CkOperationHandle
Properties
OperationId
The opaque id of the operation, unique in the tenant. Keep it to read the operation again later (e.g. after a
restart of the client); new CkOperationHandle(operationId) recreates the handle.
public string OperationId { get; }
Property Value
MethodId
The qualified id of the method that started the operation, e.g. System.Bot/TenantRepository.Dump-1;
null for a handle created from an id only.
public string MethodId { get; }
Property Value
InvocationId
The invocation id of the call that started the operation (correlation with the handler log).
public string InvocationId { get; }
Property Value
AcceptedAtUtc
The time (UTC) the operation was accepted.
public Nullable<DateTime> AcceptedAtUtc { get; }
Property Value
RetryAfterSeconds
The suggested delay before the first status check, in seconds; CkOperationsClient waits at least this long between two reads.
public Nullable<int> RetryAfterSeconds { get; }
Property Value
ExpiresAtUtc
The time (UTC) after which the platform may forget the operation; null while it is open.
public Nullable<DateTime> ExpiresAtUtc { get; }
Property Value
DeclaredErrorCodes
The error codes the method declares in its CK model. A failed operation with one of these codes is returned as CkMethodResult.Error by CkOperationsClient.WaitForOperationAsync(CkOperationHandle, IProgress<CkOperation>, CkOperationWaitOptions, CancellationToken); every other code is thrown as CkMethodCallException.
public IReadOnlyCollection<string> DeclaredErrorCodes { get; }
Property Value
Constructors
CkOperationHandle(String, String, String, Nullable<DateTime>, Nullable<Int32>, Nullable<DateTime>, IReadOnlyCollection<String>)
Creates a handle.
public CkOperationHandle(string operationId, string methodId, string invocationId, Nullable<DateTime> acceptedAtUtc, Nullable<int> retryAfterSeconds, Nullable<DateTime> expiresAtUtc, IReadOnlyCollection<string> declaredErrorCodes)
Parameters
operationId String
The opaque id of the operation
methodId String
The qualified id of the method that started it; null when unknown
invocationId String
The invocation id of the call that started it; null when unknown
acceptedAtUtc Nullable<DateTime>
The time (UTC) the operation was accepted
retryAfterSeconds Nullable<Int32>
The suggested delay before the first status check, in seconds
expiresAtUtc Nullable<DateTime>
The time (UTC) after which the operation may be forgotten; null while it is open
declaredErrorCodes IReadOnlyCollection<String>
The error codes the method declares; a failed operation with one of them is a result, not an exception
Methods
ToString()
public string ToString()