Share via


DeviceWatcher.Added 이벤트

정의

DeviceWatcher에서 열거한 컬렉션에 디바이스를 추가할 때 발생하는 이벤트입니다.

// Register
event_token Added(TypedEventHandler<DeviceWatcher, DeviceInformation const&> const& handler) const;

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

// Revoke with event_revoker
DeviceWatcher::Added_revoker Added(auto_revoke_t, TypedEventHandler<DeviceWatcher, DeviceInformation const&> const& handler) const;
public event TypedEventHandler<DeviceWatcher,DeviceInformation> Added;
function onAdded(eventArgs) { /* Your code */ }
deviceWatcher.addEventListener("added", onAdded);
deviceWatcher.removeEventListener("added", onAdded);
- or -
deviceWatcher.onadded = onAdded;
Public Custom Event Added As TypedEventHandler(Of DeviceWatcher, DeviceInformation) 

이벤트 유형

설명

참고

앱은 추가, 제거 및 업데이트 모든 이벤트를 구독하여 디바이스 추가, 제거 또는 업데이트가 있을 때 알림을 받아야 합니다. 앱이 추가된 이벤트만 처리하는 경우 초기 디바이스 열거가 완료된 후 디바이스가 시스템에 추가되면 업데이트가 수신되지 않습니다.

적용 대상

추가 정보