Share via


TransferTargetWatcher.EnumerationCompleted Event

Definition

The EnumerationCompleted event occurs when the TransferTargetWatcher completes the initial enumeration of transfer targets. This event indicates that all currently available targets have been discovered.

/// [Windows.Foundation.Metadata.Experimental]
/// [add: Windows.Foundation.Metadata.Experimental]
/// [remove: Windows.Foundation.Metadata.Experimental]
// Register
event_token EnumerationCompleted(TypedEventHandler<TransferTargetWatcher, IInspectable const&> const& handler) const;

// Revoke with event_token
void EnumerationCompleted(event_token const* cookie) const;

// Revoke with event_revoker
TransferTargetWatcher::EnumerationCompleted_revoker EnumerationCompleted(auto_revoke_t, TypedEventHandler<TransferTargetWatcher, IInspectable const&> const& handler) const;
[Windows.Foundation.Metadata.Experimental]
[add: Windows.Foundation.Metadata.Experimental]
[remove: Windows.Foundation.Metadata.Experimental]
public event TypedEventHandler<TransferTargetWatcher,object> EnumerationCompleted;
function onEnumerationCompleted(eventArgs) { /* Your code */ }
transferTargetWatcher.addEventListener("enumerationcompleted", onEnumerationCompleted);
transferTargetWatcher.removeEventListener("enumerationcompleted", onEnumerationCompleted);
- or -
transferTargetWatcher.onenumerationcompleted = onEnumerationCompleted;
Public Custom Event EnumerationCompleted As TypedEventHandler(Of TransferTargetWatcher, Object) 

Event Type

Attributes

Examples

Example: Handling the EnumerationCompleted Event

watcher.EnumerationCompleted += (sender, args) =>
{
    Console.WriteLine("Enumeration of transfer targets completed.");
};

Remarks

Applications can handle the EnumerationCompleted event to perform actions after the initial discovery of transfer targets is complete. This is useful for scenarios where the application needs to wait for all targets to be enumerated before proceeding.

Event Arguments:

  • object: Reserved for future use; currently does not provide additional data.

Applies to

See also