Пример #1
0
        private void RemoveAttendeeScanOut(ScanInfo scanInfo, string scanId)
        {
            var removeEvent = new AttendeeScanOutRemoved(scanInfo)
            {
                ScanId = scanId
            };

            this.Apply(removeEvent);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public void When(AttendeeScanOutRemoved e) => PublishToClients(e);
Пример #4
0
 public void When(AttendeeScanOutRemoved e)
 {
     this.ReadingsOut.RemoveAll(r => r.PersonId.Equals(e.PersonId, StringComparison.OrdinalIgnoreCase));
 }
Пример #5
0
 public void When(AttendeeScanOutRemoved e)
 {
     RemoveScanEvent(e);
 }