Geofence Konstruktor
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Overload
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. |
Geofence(String, IGeoshape)
public:
Geofence(Platform::String ^ id, IGeoshape ^ geoshape);
Geofence(winrt::hstring const& id, IGeoshape const& geoshape);
public Geofence(string id, IGeoshape geoshape);
function Geofence(id, geoshape)
Public Sub New (id As String, geoshape As IGeoshape)
Parameter
- id
-
String
Platform::String
winrt::hstring
Id geofence.
- geoshape
- IGeoshape
Area yang mendefinisikan geofence untuk dipantau.
Persyaratan Windows
Kemampuan aplikasi |
location
|
Keterangan
Ketika konstruktor ini digunakan, MonitoredStates akan default untuk memantau status Entered dan Exited , SingleUse akan default ke false, DwellTime akan default ke 10 detik, StartTime akan default ke 0 yang berarti segera dimulai, dan Durasi akan default ke 0, yang berarti selamanya.
Nilai id harus non-null dan kurang dari 64 karakter.
Parameter geoshape harus geocircle non-null dengan SpatialReferenceId yang cocok dengan platform atau pengecualian akan dilemparkan.
Lihat juga
- Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean)
- Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan)
- Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan, DateTime, TimeSpan)
- Geofencing, mulai selesai
Berlaku untuk
Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean)
public:
Geofence(Platform::String ^ id, IGeoshape ^ geoshape, MonitoredGeofenceStates monitoredStates, bool singleUse);
Geofence(winrt::hstring const& id, IGeoshape const& geoshape, MonitoredGeofenceStates const& monitoredStates, bool const& singleUse);
public Geofence(string id, IGeoshape geoshape, MonitoredGeofenceStates monitoredStates, bool singleUse);
function Geofence(id, geoshape, monitoredStates, singleUse)
Public Sub New (id As String, geoshape As IGeoshape, monitoredStates As MonitoredGeofenceStates, singleUse As Boolean)
Parameter
- id
-
String
Platform::String
winrt::hstring
Id geofence.
- geoshape
- IGeoshape
Area yang mendefinisikan geofence untuk dipantau.
- monitoredStates
- MonitoredGeofenceStates
Status untuk memantau geofence.
- singleUse
-
Boolean
bool
True menunjukkan geofence harus dipantau hanya untuk satu penggunaan. False menunjukkan geofence harus dipantau untuk beberapa penggunaan.
Persyaratan Windows
Kemampuan aplikasi |
location
|
Lihat juga
- Geofence(String, IGeoshape)
- Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan)
- Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan, DateTime, TimeSpan)
- Geofencing, mulai selesai
Berlaku untuk
Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan)
public:
Geofence(Platform::String ^ id, IGeoshape ^ geoshape, MonitoredGeofenceStates monitoredStates, bool singleUse, TimeSpan dwellTime);
Geofence(winrt::hstring const& id, IGeoshape const& geoshape, MonitoredGeofenceStates const& monitoredStates, bool const& singleUse, TimeSpan const& dwellTime);
public Geofence(string id, IGeoshape geoshape, MonitoredGeofenceStates monitoredStates, bool singleUse, System.TimeSpan dwellTime);
function Geofence(id, geoshape, monitoredStates, singleUse, dwellTime)
Public Sub New (id As String, geoshape As IGeoshape, monitoredStates As MonitoredGeofenceStates, singleUse As Boolean, dwellTime As TimeSpan)
Parameter
- id
-
String
Platform::String
winrt::hstring
Id geofence.
- geoshape
- IGeoshape
Area yang mendefinisikan geofence untuk dipantau.
- monitoredStates
- MonitoredGeofenceStates
Status untuk memantau geofence.
- singleUse
-
Boolean
bool
True menunjukkan geofence harus dipantau hanya untuk satu penggunaan. False menunjukkan geofence harus dipantau untuk beberapa penggunaan.
Waktu saat posisi harus masuk atau keluar dari geofence agar pemberitahuan dipicu. Objek ini harus mewakili nilai positif.
Persyaratan Windows
Kemampuan aplikasi |
location
|
Lihat juga
- Geofence(String, IGeoshape)
- Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean)
- Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan, DateTime, TimeSpan)
- Geofencing, mulai selesai
Berlaku untuk
Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan, DateTime, TimeSpan)
public:
Geofence(Platform::String ^ id, IGeoshape ^ geoshape, MonitoredGeofenceStates monitoredStates, bool singleUse, TimeSpan dwellTime, DateTime startTime, TimeSpan duration);
Geofence(winrt::hstring const& id, IGeoshape const& geoshape, MonitoredGeofenceStates const& monitoredStates, bool const& singleUse, TimeSpan const& dwellTime, DateTime const& startTime, TimeSpan const& duration);
public Geofence(string id, IGeoshape geoshape, MonitoredGeofenceStates monitoredStates, bool singleUse, System.TimeSpan dwellTime, System.DateTimeOffset startTime, System.TimeSpan duration);
function Geofence(id, geoshape, monitoredStates, singleUse, dwellTime, startTime, duration)
Public Sub New (id As String, geoshape As IGeoshape, monitoredStates As MonitoredGeofenceStates, singleUse As Boolean, dwellTime As TimeSpan, startTime As DateTimeOffset, duration As TimeSpan)
Parameter
- id
-
String
Platform::String
winrt::hstring
Id geofence.
- geoshape
- IGeoshape
Area yang mendefinisikan geofence untuk dipantau.
- monitoredStates
- MonitoredGeofenceStates
Status untuk memantau geofence.
- singleUse
-
Boolean
bool
True menunjukkan geofence harus dipantau hanya untuk satu penggunaan. False menunjukkan geofence harus dipantau untuk beberapa penggunaan.
Waktu saat posisi harus masuk atau keluar dari geofence agar pemberitahuan dipicu. Objek ini harus mewakili nilai positif.
- startTime
- DateTime DateTimeOffset
Waktu untuk mulai memantau geofence.
Durasi waktu untuk memantau geofence. Durasi dimulai pada startTime. Objek ini harus mewakili nilai positif.
Persyaratan Windows
Kemampuan aplikasi |
location
|
Keterangan
Anda harus menentukan status Dimasukkan atau Keluar , atau keduanya, agar geofence dipantau. Tidak dimungkinkan untuk membuat geofence yang hanya memantau status Dihapus .
Nilai id harus non-null dan kurang dari 64 karakter.
Parameter geoshape harus geocircle non-null dengan SpatialReferenceId yang cocok dengan platform atau pengecualian akan dilemparkan.
Jika tanggal kedaluwarsa untuk geofence - yang merupakan waktu mulai ditambah rentang waktu durasi - terjadi lebih cepat dari waktu pembuatan ditambah nilai waktu tinggal, pengecualian akan dilemparkan.
Lihat juga
- Geofence(String, IGeoshape)
- Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean)
- Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan)
- Geofencing, mulai selesai