private string GenerateReportDescription(GeofenceStateChangeReport report) { GeofenceState state = report.NewState; DateTimeOffset timestamp = report.Geoposition.Coordinate.Timestamp; string result = $"{report.Geofence.Id} {timestamp:G}"; if (state == GeofenceState.Removed) { GeofenceRemovalReason reason = report.RemovalReason; if (reason == GeofenceRemovalReason.Expired) { result += " (Removed/Expired)"; } else if (reason == GeofenceRemovalReason.Used) { result += " (Removed/Used)"; } } else if (state == GeofenceState.Entered) { result += " (Entered)"; } else if (state == GeofenceState.Exited) { result += " (Exited)"; } return(result); }
private ToastNotification MakeToast(GeofenceStateChangeReport report, Alarm alarm) { var tost = new SimpleToast("You have entered location", alarm.Name, alarm.AlarmSound); return(new ToastNotification(tost.ToastBlueprint)); }
public TriggeredAlarm(GeofenceStateChangeReport report, Alarm alarm) { Report = report; Alarm = alarm; }