Android Guides | Samples

Android.OS.CancellationSignal Class

Provides the ability to cancel an operation in progress.

See Also: CancellationSignal

Syntax

[Android.Runtime.Register("android/os/CancellationSignal", DoNotGenerateAcw=true)]
public sealed class CancellationSignal : Object

Remarks

Provides the ability to cancel an operation in progress.

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16

The members of Android.OS.CancellationSignal are listed below.

See Also: Object

Public Constructors

Creates a cancellation signal, initially not canceled.

Public Properties

[read-only]
IsCanceledBoolean. Returns true if the operation has been canceled.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Cancel()
Cancels the operation and signals the cancellation listener.
SetOnCancelListener(CancellationSignal+IOnCancelListener)
Sets the cancellation listener to be called when canceled.
ThrowIfCanceled()
Throws OperationCanceledException if the operation has been canceled.

Public Events