private GeofencingRequest CreateGeofencingRequest(IGeofence geofence) { var builder = new GeofencingRequest.Builder(); builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter); builder.AddGeofence(geofence); return(builder.Build()); }
public GeofencingRequest GetAddGeofencingRequest(IGeofence geofence) { List <IGeofence> geofencesToAdd = new List <IGeofence>(); geofencesToAdd.Add(geofence); GeofencingRequest.Builder builder = new GeofencingRequest.Builder(); builder.SetInitialTrigger(GeofencingRequest.InitialTriggerEnter); builder.AddGeofences(geofencesToAdd); return(builder.Build()); }
internal static IGeofence BindGeofence(this IEnumerable <IPrimitive> items, IGeofence g) { if (items != null) { foreach (var i in items) { i.BindGeofence(g); } } return(g); }
internal static IGeofence BindGeofence <T>(this IEnumerable <T> items, IGeofence g) where T : IGeofencingItem { if (items != null) { foreach (var i in items) { i.Geofence = g; } } return(g); }
public static IList <ITreeNode> ValidateRoots(this IGeofence geofence, IList <ITreeNode> actual) { if (actual == null && geofence.Nodes.Count != 0) { if (geofence.RootIndices == null) { geofence.RootIndices = new int[] { 0 }; } IList <ITreeNode> roots = new List <ITreeNode>(geofence.RootIndices.Length); var nodes = geofence.Nodes; for (int i = 0; i != geofence.RootIndices.Length; i++) { if (i > 0 || i <= nodes.Count) { roots.Add(nodes[i]); } } actual = roots; } return(actual); }
internal static void BindGeofence(this IPrimitive i, IGeofence g) { i.Geofence = g; i.TriggerMask = i.BuildTriggerMask(); }
/// <summary> /// Creates the geofence. /// </summary> /// <returns>The geofence.</returns> private static IGeofence CreateGeofence() { IGeofence geo = DependencyService.Get <IGeofence>(); return(geo); }