Table of Contents

Class DispatcherOperation

Namespace
Avalonia.Threading
Assembly
Avalonia.Base.dll
public class DispatcherOperation
Inheritance
DispatcherOperation
Derived
Inherited Members

Fields

Callback

protected object? Callback

Field Value

object

TaskSource

protected object? TaskSource

Field Value

object

ThrowOnUiThread

protected readonly bool ThrowOnUiThread

Field Value

bool

Properties

Dispatcher

public Dispatcher Dispatcher { get; }

Property Value

Dispatcher

Priority

public DispatcherPriority Priority { get; set; }

Property Value

DispatcherPriority

Status

public DispatcherOperationStatus Status { get; protected set; }

Property Value

DispatcherOperationStatus

Methods

Abort()

public bool Abort()

Returns

bool

AbortTask()

protected virtual void AbortTask()

GetTask()

public Task GetTask()

Returns

Task

GetTaskCore()

protected virtual Task GetTaskCore()

Returns

Task

InvokeCore()

protected virtual void InvokeCore()

Wait()

Waits for this operation to complete.

public void Wait()

Wait(TimeSpan)

Waits for this operation to complete.

public void Wait(TimeSpan timeout)

Parameters

timeout TimeSpan

The maximum amount of time to wait.

Events

Aborted

An event that is raised when the operation is aborted or canceled.

public event EventHandler Aborted

Event Type

EventHandler

Completed

An event that is raised when the operation completes.

public event EventHandler Completed

Event Type

EventHandler

Remarks

Completed indicates that the operation was invoked and has either completed successfully or faulted. Note that a canceled or aborted operation is never is never considered completed.