Skip to main content

DispatcherOperation Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia
public class DispatcherOperation

Inheritance: object -> DispatcherOperation

Methods​

NameDescription
AbortNo summary available.
GetAwaiterReturns an awaiter for awaiting the completion of the operation.
GetTaskNo summary available.
Wait (2 overloads)Waits for this operation to complete.

Abort Method​

public bool Abort()

Returns​

bool

GetAwaiter Method​

Returns an awaiter for awaiting the completion of the operation.

public System.Runtime.CompilerServices.TaskAwaiter GetAwaiter()

Returns​

System.Runtime.CompilerServices.TaskAwaiter

Remarks​

This method is intended to be used by compilers.

GetTask Method​

public System.Threading.Tasks.Task GetTask()

Returns​

System.Threading.Tasks.Task

Wait overloads​

Wait Method​

Waits for this operation to complete.

public void Wait()
Returns​

The status of the operation. To obtain the return value of the invoked delegate, use the Result property.

Wait Method​

Waits for this operation to complete.

public void Wait(TimeSpan timeout)
Parameters​

timeout TimeSpan

The maximum amount of time to wait.

Properties​

NameDescription
DispatcherNo summary available.
PriorityNo summary available.
StatusNo summary available.

Dispatcher Property​

public Avalonia.Threading.Dispatcher Dispatcher { get; set; }

Priority Property​

public Avalonia.Threading.DispatcherPriority Priority { get; set; }

Status Property​

public Avalonia.Threading.DispatcherOperationStatus Status { get; set; }

Events​

NameDescription
AbortedAn event that is raised when the operation is aborted or canceled.
CompletedAn event that is raised when the operation completes.

Aborted Event​

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

public event EventHandler Aborted

Completed Event​

An event that is raised when the operation completes.

public event EventHandler Completed

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.