Share via


BackgroundTaskRegistrationGroup.BackgroundActivated 이벤트

정의

이 이벤트는 그룹에 속한 백그라운드 작업이 시작될 때 발생합니다.

// Register
event_token BackgroundActivated(TypedEventHandler<BackgroundTaskRegistrationGroup, BackgroundActivatedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
BackgroundTaskRegistrationGroup::BackgroundActivated_revoker BackgroundActivated(auto_revoke_t, TypedEventHandler<BackgroundTaskRegistrationGroup, BackgroundActivatedEventArgs const&> const& handler) const;
public event TypedEventHandler<BackgroundTaskRegistrationGroup,BackgroundActivatedEventArgs> BackgroundActivated;
function onBackgroundActivated(eventArgs) { /* Your code */ }
backgroundTaskRegistrationGroup.addEventListener("backgroundactivated", onBackgroundActivated);
backgroundTaskRegistrationGroup.removeEventListener("backgroundactivated", onBackgroundActivated);
- or -
backgroundTaskRegistrationGroup.onbackgroundactivated = onBackgroundActivated;
Public Custom Event BackgroundActivated As TypedEventHandler(Of BackgroundTaskRegistrationGroup, BackgroundActivatedEventArgs) 

이벤트 유형

예제

백그라운드 활성화 샘플 그룹화된 작업 예제는 시나리오 6을 참조하세요.

설명

그룹과 연결된 백그라운드 트리거는 작업 진입점을 갖는 대신 이 이벤트를 발생합니다. 백그라운드 작업 등록에서 진입점을 정의하지 않는 단일 프로세스 백그라운드 작업의 경우 이 이벤트는 진입점입니다. 애플리케이션의 OnBackgroundActivated 메서드를 호출하는 대신 그룹에 연결된 이벤트가 호출됩니다.

적용 대상

추가 정보