TetheringEntitlementCheckTrigger 클래스

정의

실행할 백그라운드 작업을 트리거하는 테더링 이벤트를 나타냅니다.

public ref class TetheringEntitlementCheckTrigger sealed : IBackgroundTrigger
/// [Windows.Foundation.Metadata.Activatable(393216, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TetheringEntitlementCheckTrigger final : IBackgroundTrigger
[Windows.Foundation.Metadata.Activatable(393216, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TetheringEntitlementCheckTrigger : IBackgroundTrigger
function TetheringEntitlementCheckTrigger()
Public NotInheritable Class TetheringEntitlementCheckTrigger
Implements IBackgroundTrigger
상속
Object IInspectable TetheringEntitlementCheckTrigger
특성
구현

Windows 요구 사항

디바이스 패밀리
Windows 10, version 1803 (10.0.17134.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v6.0에서 도입되었습니다.)
앱 기능
networkConnectionManagerProvisioning

예제

다음 예제에서는 테더링 트리거를 만들고 등록하는 방법을 보여줍니다.

using Windows.ApplicationModel.Background;

void RegisterTetheringTrigger()
{
  bool taskAlreadyRegistered = false;
  string exampleTaskName = "MyEntitlementTask";

  foreach (var task in BackgroundTaskRegistration.AllTasks)
  {
      if (task.Value.Name == exampleTaskName)
      {
          taskAlreadyRegistered = true;
          break;
      }
  }

  if (!taskAlreadyRegistered)
  {
      var builder = new BackgroundTaskBuilder();

      builder.Name = exampleTaskName;
      builder.TaskEntryPoint = "Sample.TheActualBackgroundTask";
      var trigger = new TetheringEntitlementCheckTrigger();
      builder.SetTrigger(trigger);
      builder.Register();
  }
}

설명

이 트리거가 등록되고 셀룰러 고객이 Windows UI를 통해 테더링을 켜려고 하면 백그라운드 작업이 트리거됩니다. 모바일 네트워크 운영자는 트리거된 백그라운드 작업을 사용하여 셀룰러 고객이 자격에 따라 테더링 기능을 사용할 수 있는지 여부를 Windows 통신할 수 있습니다.

백그라운드 작업은 통신사용 COSA(Country and Operator 설정 Asset) 데이터베이스에 올바르게 등록된 경우에만 트리거됩니다. 자세한 내용은 데스크톱 COSA/APN 데이터베이스 설정을 참조하세요.

경고

테더링 트리거가 여러 번 다시 등록되는 경우 예상대로 작동하지 않을 수 있습니다.

생성자

TetheringEntitlementCheckTrigger()

테더링 이벤트 트리거의 새 인스턴스를 만들고 초기화합니다.

적용 대상