Partilhar via


PhoneTrigger Classe

Definição

Representa um evento de telefone que dispara uma tarefa em segundo plano.

public ref class PhoneTrigger sealed : IBackgroundTrigger
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IPhoneTriggerFactory, 65536, Windows.ApplicationModel.Calls.CallsPhoneContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Calls.CallsPhoneContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PhoneTrigger final : IBackgroundTrigger
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IPhoneTriggerFactory, 65536, "Windows.ApplicationModel.Calls.CallsPhoneContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Calls.Background.CallsBackgroundContract, 65536)]
/// [Windows.Foundation.Metadata.PreviousContractVersion("Windows.ApplicationModel.Calls.CallsPhoneContract", 65536, 131072)]
class PhoneTrigger final : IBackgroundTrigger
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IPhoneTriggerFactory, 65536, "Windows.ApplicationModel.Calls.CallsPhoneContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Calls.Background.CallsBackgroundContract, 65536)]
/// [Windows.Foundation.Metadata.PreviousContractVersion("Windows.ApplicationModel.Calls.CallsPhoneContract", 65536, 196608)]
class PhoneTrigger final : IBackgroundTrigger
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IPhoneTriggerFactory), 65536, typeof(Windows.ApplicationModel.Calls.CallsPhoneContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Calls.CallsPhoneContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PhoneTrigger : IBackgroundTrigger
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IPhoneTriggerFactory), 65536, "Windows.ApplicationModel.Calls.CallsPhoneContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Calls.Background.CallsBackgroundContract), 65536)]
[Windows.Foundation.Metadata.PreviousContractVersion("Windows.ApplicationModel.Calls.CallsPhoneContract", 65536, 131072)]
public sealed class PhoneTrigger : IBackgroundTrigger
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IPhoneTriggerFactory), 65536, "Windows.ApplicationModel.Calls.CallsPhoneContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Calls.Background.CallsBackgroundContract), 65536)]
[Windows.Foundation.Metadata.PreviousContractVersion("Windows.ApplicationModel.Calls.CallsPhoneContract", 65536, 196608)]
public sealed class PhoneTrigger : IBackgroundTrigger
function PhoneTrigger(type, oneShot)
Public NotInheritable Class PhoneTrigger
Implements IBackgroundTrigger
Herança
Object Platform::Object IInspectable PhoneTrigger
Atributos
Implementações

Requisitos do Windows

Família de dispositivos
Windows Mobile Extension SDK (introduzida na 10.0.10240.0)
Windows Desktop Extension SDK (introduzida na 10.0.10586.0)
Windows Mobile Extension SDK (introduzida na 10.0.10586.0)
Windows 10, version 1809 (introduzida na 10.0.17763.0)
API contract
Windows.ApplicationModel.Calls.CallsPhoneContract (introduzida na v1.0)
Windows.ApplicationModel.Calls.Background.CallsBackgroundContract (introduzida na v1.0)

Construtores

PhoneTrigger(PhoneTriggerType, Boolean)

Inicializa uma nova instância da classe PhoneTrigger .

Propriedades

OneShot

Obtém um valor booliano que indica se o gatilho é uma notificação única.

TriggerType

Obtém o tipo de evento de telefone indicado pelo gatilho.

Aplica-se a

Confira também