Class DispatcherOperation
DispatcherOperation represents a delegate that has been posted to the Dispatcher queue.
Inherited Members
Namespace: nanoFramework.UI.Threading
Assembly: nanoFramework.Graphics.dll
Syntax
public sealed class DispatcherOperation
Properties
Dispatcher
Returns the Dispatcher that this operation was posted to.
Declaration
public Dispatcher Dispatcher { get; }
Property Value
Type | Description |
---|---|
Dispatcher |
Result
Returns the result of the operation if it has completed.
Declaration
public object Result { get; }
Property Value
Type | Description |
---|---|
object |
Status
The status of this operation.
Declaration
public DispatcherOperationStatus Status { get; }
Property Value
Type | Description |
---|---|
DispatcherOperationStatus |
Methods
Abort()
Aborts this operation.
Declaration
public bool Abort()
Returns
Type | Description |
---|---|
bool | False if the operation could not be aborted (because the operation was already in progress) |
Wait()
Waits for this operation to complete.
Declaration
public DispatcherOperationStatus Wait()
Returns
Type | Description |
---|---|
DispatcherOperationStatus | The status of the operation. To obtain the return value of the invoked delegate, use the the Result property. |
Wait(TimeSpan)
Waits for this operation to complete.
Declaration
public DispatcherOperationStatus Wait(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | The maximum amount of time to wait. |
Returns
Type | Description |
---|---|
DispatcherOperationStatus | The status of the operation. To obtain the return value of the invoked delegate, use the the Result property. |
Events
Aborted
An event that is raised when the operation is aborted.
Declaration
public event EventHandler Aborted
Event Type
Type | Description |
---|---|
EventHandler |
Completed
An event that is raised when the operation completes.
Declaration
public event EventHandler Completed
Event Type
Type | Description |
---|---|
EventHandler |