Geofence Kelas

Definisi

Berisi fungsionalitas untuk menentukan geofence (area geografis yang menarik) untuk dipantau.

public ref class Geofence sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Geolocation.Geofencing.IGeofenceFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class Geofence final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Geolocation.Geofencing.IGeofenceFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class Geofence final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Geolocation.Geofencing.IGeofenceFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class Geofence
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Geolocation.Geofencing.IGeofenceFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class Geofence
function Geofence(id, geoshape, monitoredStates, singleUse, dwellTime, startTime, duration)
Public NotInheritable Class Geofence
Warisan
Object Platform::Object IInspectable Geofence
Atribut

Persyaratan Windows

Rangkaian perangkat
Windows 10 (diperkenalkan dalam 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v1.0)
Kemampuan aplikasi
location

Konstruktor

Geofence(String, IGeoshape)

Menginisialisasi objek Geofence baru mengingat id dan bentuk geofence.

Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean)

Menginisialisasi objek Geofence baru yang diberikan id, bentuk geofence, status untuk memantau geofence, dan bendera singleUse .

Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan)

Menginisialisasi objek Geofence baru yang diberikan id, bentuk geofence, status untuk memantau geofence untuk, bendera singleUse , dan dwellTime untuk geofence.

Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan, DateTime, TimeSpan)

Menginisialisasi objek Geofence baru yang diberikan id, bentuk geofence, status untuk memantau geofence untuk, bendera singleUse , dwellTime untuk geofence, waktu untuk mulai memantau geofence, dan durasi geofence.

Properti

Duration

Mendapatkan jendela waktu, dimulai setelah StartTime, di mana Geofence dipantau.

DwellTime

Waktu minimum posisi harus berada di dalam atau di luar Geofence agar pemberitahuan dipicu.

Geoshape

Bentuk wilayah geofence.

Id

Id Geofence.

MonitoredStates

Menunjukkan status bahwa Geofence sedang dipantau.

SingleUse

Menunjukkan apakah Geofence harus dipicu sekali atau beberapa kali.

StartTime

Waktu untuk mulai memantau Geofence.

Berlaku untuk

Lihat juga