Class ScreenWork
- Namespace
- MackySoft.Navigathena
- Assembly
- MackySoft.Navigathena.dll
A continuation owned by a screen instance's current history binding. Stopping activity does not cancel it; ending that binding does.
public sealed class ScreenWork
- Inheritance
-
ScreenWork
- Inherited Members
Remarks
Completion releases the execution callback and cancellation resources. The handle keeps the result available for later waits.
Methods
Cancel()
Requests execution cancellation, or cancels pending work without invoking it. Completed work is unaffected.
public void Cancel()
Remarks
Await WaitAsync(CancellationToken) to observe completion, including asynchronous cleanup in the callback.
Exceptions
- AggregateException
A callback registered with the work's cancellation token throws.
WaitAsync(CancellationToken)
Waits until the entire callback, including asynchronous finally blocks and code after InvokeAsync, has finished using screen resources.
public Task WaitAsync(CancellationToken waitCancellationToken = default)
Parameters
waitCancellationTokenCancellationTokenCancels only this wait, without canceling execution.
Returns
- Task
A task carrying the callback's success, failure, or cancellation after its resource use has ended.
Exceptions
- InvalidOperationException
A lifecycle callback or this work attempts to wait for the work.