IAsyncActionWithProgress<TProgress>.Completed IAsyncActionWithProgress<TProgress>.Completed IAsyncActionWithProgress<TProgress>.Completed IAsyncActionWithProgress<TProgress>.Completed IAsyncActionWithProgress<TProgress>.Completed Property

Definition

Gets or sets the method that handles the action completed notification.

public : AsyncActionWithProgressCompletedHandler<TProgress> Completed { get; set; }
AsyncActionWithProgressCompletedHandler<TProgress> Completed();

void Completed(AsyncActionWithProgressCompletedHandler<TProgress> completed);
public AsyncActionWithProgressCompletedHandler<TProgress> Completed { get; set; }
Public ReadWrite Property Completed As AsyncActionWithProgressCompletedHandler<TProgress>
var asyncActionWithProgressCompletedHandler = iAsyncActionWithProgress`1.completed;
iAsyncActionWithProgress`1.completed = asyncActionWithProgressCompletedHandler;

Property Value

Examples

For example C++/WinRT code illustrating how to handle the Completed event, see Delegate types for asynchronous actions and operations.

Remarks

The Windows Runtime enforces that this property can only be set once on an action.

Generally, a completed IAsyncActionWithProgress; method called using language-specific awaitable syntax does nothing further than to return null when it completes.

If you're implementing IAsyncActionWithProgress;, then the set implementation of Completed should store the handler, and the surrounding logic should invoke it when Close is called. The implementation should set the asyncStatus parameter of invoked callbacks appropriately if there is a Cancel call, Status is not Completed, errors occurred, and so on.

See also