UserActivityChannel 클래스

정의

이 디바이스 또는 다른 디바이스에서 만든 개체를 만들거나 가져옵니다 UserActivity .

public ref class UserActivityChannel sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class UserActivityChannel final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UserActivityChannel final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class UserActivityChannel
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class UserActivityChannel
Public NotInheritable Class UserActivityChannel
상속
Object IInspectable UserActivityChannel
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 Fall Creators Update (10.0.16299.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v5.0에서 도입되었습니다.)

예제

   // Get the default UserActivityChannel and query it for our UserActivity. If the activity doesn't exist, one is created.
   UserActivityChannel channel = UserActivityChannel.GetDefault();
   UserActivity userActivity = await channel.GetOrCreateUserActivityAsync("AddCustomerPage");

설명

버전 기록

Windows 버전 SDK 버전 추가된 값
1803 17134 DisableAutoSessionCreation
1803 17134 GetRecentUserActivitiesAsync
1803 17134 GetSessionHistoryItemsForUserActivityAsync
1803 17134 TryGetForWebAccount
1903 18362 GetForUser

메서드

DeleteActivityAsync(String)

특정 사용자 활동을 삭제합니다.

DeleteAllActivitiesAsync()

이 앱에서 등록한 모든 사용자 활동을 삭제합니다.

DisableAutoSessionCreation()

새 UserActivity를 만들 때 세션의 자동 생성을 사용하지 않도록 설정합니다.

GetDefault()

사용자의 MSA(관리 서비스 계정)와 연결된 사용자 활동에 대한 액세스를 제공합니다.

GetForUser(User)

현재 앱의 컨텍스트에서 지정된 사용자에 대한 UserActivity 개체를 가져오거나 만드는 데 사용할 수 있는 UserActivityChannel 개체를 가져옵니다.

GetOrCreateUserActivityAsync(String)

지정된 ID를 사용하여 a를 UserActivity 만들거나 가져옵니다.

GetRecentUserActivitiesAsync(Int32)

각 사용자 활동이 종료된 시간을 기준으로 정렬된 가장 최근에 참여한 사용자 활동의 지정된 수까지 가져옵니다.

GetSessionHistoryItemsForUserActivityAsync(String, DateTime)

사용자 활동에 대한 세션 기록을 가져옵니다.

TryGetForWebAccount(WebAccount)

사용자 활동을 기록하는 데 사용할 지정된 웹 계정과 관련된 채널을 가져옵니다.

적용 대상