-api-id | -api-type |
---|---|
M:Windows.Devices.Geolocation.Geofencing.Geofence.#ctor(System.String,Windows.Devices.Geolocation.IGeoshape,Windows.Devices.Geolocation.Geofencing.MonitoredGeofenceStates,System.Boolean,Windows.Foundation.TimeSpan,Windows.Foundation.DateTime,Windows.Foundation.TimeSpan) |
winrt method |
Initializes a new Geofence object given the id, the shape of the geofence, the states to monitor the geofence for, the singleUse flag, the dwellTime for the geofence, the time to start monitoring the geofence, and the duration of the geofence.
The Id of the geofence.
The area that defines the geofence to monitor.
The states to monitor the geofence for.
True indicates the geofence should be monitored only for one use. False indicates the geofence should be monitored for multiple uses.
The time that a position has to be in or out of the geofence in order for the notification to be triggered.This object must represent a positive value.
The time to start monitoring the geofence.
The duration of time to monitor the geofence for. The duration begins at the startTime. This object must represent a positive value.
You must specify the Entered or Exited states, or both, for a geofence to be monitored. It is not possible to create a geofence that only monitors the Removed state.
The id value must be non-null and less than 64 characters.
The geoshape parameter must be a non-null Geocircle with a SpatialReferenceId that matches the platform or an exception will be thrown.
If the expiration date for the geofence - which is the start time plus the duration time span - occurs sooner than the creation time plus the dwell time value, an exception will be thrown.
Geofencing, start to finish, Geofence(String, IGeoshape), Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean), Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan)
location