private void createGeofence() { ExtendedGeofenceFactory extendedGeofence = new ExtendedGeofenceFactory(); Geofence createdGeofence = extendedGeofence.CreateGeofence("FENCE", <LATITUDE HERE>, <LONGITUDE HERE>, 0, 40, false, 2, 1); if (_geofences != null) { if (!_geofences.Any(geofence => geofence.Id.Equals(createdGeofence.Id))) { _geofences.Add(createdGeofence); } } }
void CreateGeofence() { var extendedGeofence = new ExtendedGeofenceFactory(); if (data != null) { foreach (var t in data) { var createdGeofence = extendedGeofence.CreateGeofence("FENCE", t.Item1, t.Item2, 0, 40, false, 2, 1); if (_geofences != null) { if (!_geofences.Any(geofence => geofence.Id.Equals(createdGeofence.Id))) { _geofences.Add(createdGeofence); } } } } }