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)