Completed property
Collapse the table of content
Expand the table of content

IAsyncAction.Completed property

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

Syntax


AsyncActionCompletedHandler Completed { get; set; }

Property value

Type: AsyncActionCompletedHandler

The method that handles the notification.

Remarks

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

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

If you're implementing IAsyncAction, 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.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

Windows.Foundation
Windows::Foundation [C++]

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Foundation
Windows::Foundation [C++]

Metadata

Windows.winmd

See also

IAsyncAction
Asynchronous programming

 

 

Show:
© 2016 Microsoft