PnpObjectWatcher.Updated イベント
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
重要
Windows.Devices.Enumeration.Pnp 名前空間で型を使用することはお勧めしません。 代わりに、Windows.Devices.Enumeration 名前空間の型は、Windows.Devices.Enumeration.Pnp の機能の最新の、より適切に保守されたスーパーセットを実装します。
PnpObjectType の代わりに、Windows.Devices.Enumeration.DeviceInformationKind 列挙型があり、パラメーターとして Windows.Devices.Enumeration API に渡すことができます。 たとえば、PnpObjectWatcher を作成するときに PnpObjectType を使用する代わりに、DeviceWatcher を作成するときに DeviceInformationKind を使用します。
PnpObjectWatcher によって列挙されたコレクション内の PnpObject のプロパティが更新されるときに発生します。
// Register
event_token Updated(TypedEventHandler<PnpObjectWatcher, PnpObjectUpdate const&> const& handler) const;
// Revoke with event_token
void Updated(event_token const* cookie) const;
// Revoke with event_revoker
PnpObjectWatcher::Updated_revoker Updated(auto_revoke_t, TypedEventHandler<PnpObjectWatcher, PnpObjectUpdate const&> const& handler) const;
public event TypedEventHandler<PnpObjectWatcher,PnpObjectUpdate> Updated;
function onUpdated(eventArgs) { /* Your code */ }
pnpObjectWatcher.addEventListener("updated", onUpdated);
pnpObjectWatcher.removeEventListener("updated", onUpdated);
- or -
pnpObjectWatcher.onupdated = onUpdated;
Public Custom Event Updated As TypedEventHandler(Of PnpObjectWatcher, PnpObjectUpdate)