Table of Contents

CloudOperation<TError>

class in Coherence.Cloud

Represents an asynchronous operation used to communicate with coherence Cloud.

Type Parameters

TError

Type of object returned if the operation fails.

Remarks

Async methods can use await to wait until the operation finishes.

Coroutines can use yield to wait until the operation finishes.

ContinueWith(Action, TaskContinuationOptions) can also be used to perform an action after the operation has completed.

Cloud operations do not throw exceptions if they fail or are cancelled; you can determine if an operation has failed using HasFailed, and if it has been canceled using IsCanceled instead.

Constructors
CloudOperation(Task)
CloudOperation(Task, CancellationToken)
Fields
task
Properties
Error
HasFailed

Gets whether the operation has failed.

IsCanceled

Gets whether this operation has completed execution due to being canceled.

IsCompleted

Gets whether the operation has completed.

IsCompletedSuccessfully

Gets whether the operation has completed successfully.

keepWaiting
Methods
ContinueWith(Action, TaskContinuationOptions)

Specify an action to perform after the operation has completed (IsCompleted is true.

GetAwaiter()

Gets an object that can be used to await for this operation to complete.

OnFail(Action<TError>)

Specify an action to perform if the operation fails (HasFailed is true.

OnSuccess(Action)

Specify an action to perform if the operation completes successfully (IsCompletedSuccessfully is true.

ToString()
Operators
implicit operator Exception(CloudOperation<TError>)
implicit operator Task(CloudOperation<TError>)