Geofence Costruttori

Definizione

Overload

Geofence(String, IGeoshape)

Inizializza un nuovo oggetto Geofence dato l'ID e la forma del geofence.

Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean)

Inizializza un nuovo oggetto Geofence dato l'ID, la forma del geofence, gli stati per monitorare il geofence e il flag SingleUse .

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

Inizializza un nuovo oggetto Geofence dato l'ID, la forma del geofence, gli stati per monitorare il geofence per, il flag SingleUse e il timetime per il geofence.

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

Inizializza un nuovo oggetto Geofence dato l'ID, la forma del geofence, gli stati per monitorare il geofence per, il flag SingleUse , il timetime per il geofence, il tempo per avviare il monitoraggio della geofence e la durata del geofence.

Geofence(String, IGeoshape)

Inizializza un nuovo oggetto Geofence dato l'ID e la forma del geofence.

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)

Parametri

id
String

Platform::String

winrt::hstring

ID del geofence.

geoshape
IGeoshape

Area che definisce il geofence da monitorare.

Requisiti Windows

Funzionalità dell'app
location

Commenti

Quando viene usato questo costruttore, l'oggetto MonitoredStates verrà impostato per impostazione predefinita per monitorare sia gli stati immessi che exited , SingleUse verrà predefinito su false, il valore di DwellTime verrà predefinito a 10 secondi, il valore StartTime verrà predefinito immediatamente e la durata verrà impostata su 0, ovvero per sempre.

Il valore id deve essere diverso da Null e minore di 64 caratteri.

Il parametro geoshape deve essere un geocircle non null con un oggetto SpatialReferenceId che corrisponde alla piattaforma o verrà generata un'eccezione.

Vedi anche

Si applica a

Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean)

Inizializza un nuovo oggetto Geofence dato l'ID, la forma del geofence, gli stati per monitorare il geofence e il flag SingleUse .

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)

Parametri

id
String

Platform::String

winrt::hstring

ID del geofence.

geoshape
IGeoshape

Area che definisce il geofence da monitorare.

monitoredStates
MonitoredGeofenceStates

Stati per monitorare il geofence.

singleUse
Boolean

bool

True indica che il geofence deve essere monitorato solo per un uso. False indica che il geofence deve essere monitorato per più usi.

Requisiti Windows

Funzionalità dell'app
location

Vedi anche

Si applica a

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

Inizializza un nuovo oggetto Geofence dato l'ID, la forma del geofence, gli stati per monitorare il geofence per, il flag SingleUse e il timetime per il geofence.

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)

Parametri

id
String

Platform::String

winrt::hstring

ID del geofence.

geoshape
IGeoshape

Area che definisce il geofence da monitorare.

monitoredStates
MonitoredGeofenceStates

Stati per monitorare il geofence.

singleUse
Boolean

bool

True indica che il geofence deve essere monitorato solo per un uso. False indica che il geofence deve essere monitorato per più usi.

dwellTime
TimeSpan TimeSpan

Ora in cui una posizione deve trovarsi o fuori dal geofence per consentire l'attivazione della notifica. Questo oggetto deve rappresentare un valore positivo.

Requisiti Windows

Funzionalità dell'app
location

Vedi anche

Si applica a

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

Inizializza un nuovo oggetto Geofence dato l'ID, la forma del geofence, gli stati per monitorare il geofence per, il flag SingleUse , il timetime per il geofence, il tempo per avviare il monitoraggio della geofence e la durata del geofence.

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)

Parametri

id
String

Platform::String

winrt::hstring

ID del geofence.

geoshape
IGeoshape

Area che definisce il geofence da monitorare.

monitoredStates
MonitoredGeofenceStates

Stati per monitorare il geofence.

singleUse
Boolean

bool

True indica che il geofence deve essere monitorato solo per un uso. False indica che il geofence deve essere monitorato per più usi.

dwellTime
TimeSpan TimeSpan

Ora in cui una posizione deve trovarsi o fuori dal geofence per consentire l'attivazione della notifica. Questo oggetto deve rappresentare un valore positivo.

startTime
DateTime DateTimeOffset

Ora di avvio del monitoraggio del geofence.

duration
TimeSpan TimeSpan

Durata del tempo per monitorare il geofence. La durata inizia all'inizioTime. Questo oggetto deve rappresentare un valore positivo.

Requisiti Windows

Funzionalità dell'app
location

Commenti

È necessario specificare gli stati immessi o di uscita o entrambi, per monitorare un geofence. Non è possibile creare un geofence che monitora solo lo stato Rimosso .

Il valore id deve essere diverso da Null e minore di 64 caratteri.

Il parametro geoshape deve essere un geocircle non null con un oggetto SpatialReferenceId che corrisponde alla piattaforma o verrà generata un'eccezione.

Se la data di scadenza per il geofence, ovvero l'ora di inizio e l'intervallo di tempo di durata, si verifica prima del tempo di creazione e del valore del tempo di attesa, verrà generata un'eccezione.

Vedi anche

Si applica a