PnpObjectWatcher.Removed 이벤트
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. 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 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)