PnpObjectWatcher.Removed Evento
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Importante
Non è più consigliabile usare i tipi nello spazio dei nomi Windows.Devices.Enumeration.Pnp . I tipi nello spazio dei nomi Windows.Devices.Enumeration implementano invece un oggetto moderno e gestito meglio, superset delle funzionalità di Windows.Devices.Enumeration.Pnp.
L'alternativa a PnpObjectType è l'enumerazione Windows.Devices.Enumeration.DeviceInformationKind , che è possibile passare come parametro alle API Windows.Devices.Enumeration . Ad esempio, anziché usare PnpObjectType quando si crea un PnpObjectWatcher, usare DeviceInformationKind quando si crea un DeviceWatcher.
Si verifica quando un PnpObject viene rimosso dalla raccolta enumerata da PnpObjectWatcher.
// Register
event_token Removed(TypedEventHandler<PnpObjectWatcher, PnpObjectUpdate const&> const& handler) const;
// Revoke with event_token
void Removed(event_token const* cookie) const;
// Revoke with event_revoker
PnpObjectWatcher::Removed_revoker Removed(auto_revoke_t, TypedEventHandler<PnpObjectWatcher, PnpObjectUpdate const&> const& handler) const;
public event TypedEventHandler<PnpObjectWatcher,PnpObjectUpdate> Removed;
function onRemoved(eventArgs) { /* Your code */ }
pnpObjectWatcher.addEventListener("removed", onRemoved);
pnpObjectWatcher.removeEventListener("removed", onRemoved);
- or -
pnpObjectWatcher.onremoved = onRemoved;
Public Custom Event Removed As TypedEventHandler(Of PnpObjectWatcher, PnpObjectUpdate)