private void RemoveAttendeeScanOut(ScanInfo scanInfo, string scanId) { var removeEvent = new AttendeeScanOutRemoved(scanInfo) { ScanId = scanId }; this.Apply(removeEvent); }
public void When(AttendeeScanOutRemoved e) { var checkpoint = GetCheckpoint(e.HappeningId, e.CheckpointId); var visit = checkpoint?.Visits.FirstOrDefault( m => m.PersonId.Equals(e.PersonId, StringComparison.OrdinalIgnoreCase)); if (visit == null) { return; } if (visit.TimeIn.HasValue) { visit.TimeOut = null; } else { // This is the out scan from beginning checkpoint.Visits.Remove(visit); } // Remove expected at from next checkpoint RemoveExpected(e.PersonId, e.HappeningId, checkpoint); }
public void When(AttendeeScanOutRemoved e) => PublishToClients(e);
public void When(AttendeeScanOutRemoved e) { this.ReadingsOut.RemoveAll(r => r.PersonId.Equals(e.PersonId, StringComparison.OrdinalIgnoreCase)); }
public void When(AttendeeScanOutRemoved e) { RemoveScanEvent(e); }