Exemple #1
0
        public void When(AttendeeScanInRemoved e)
        {
            var checkpoint = GetCheckpoint(e.HappeningId, e.CheckpointId);

            if (checkpoint == null)
            {
                return;
            }

            checkpoint.Visits.RemoveAll(
                v => v.PersonId.Equals(e.PersonId, StringComparison.OrdinalIgnoreCase));

            // Re-add expected at-date
            var happening = QueryModelRepository.Dashboard.Happenings[e.HappeningId];
            var previous  = GetPreviousCheckpoint(happening.Checkpoints, checkpoint);

            if (previous == null)
            {
                return;
            }

            var visit = previous.Visits.FirstOrDefault(
                m => m.PersonId.Equals(e.PersonId, StringComparison.OrdinalIgnoreCase));

            if (visit != null && visit.TimeOut.HasValue)
            {
                this.AddExpectedAt(e.HappeningId, visit.TimeOut.Value, e.PersonId, previous);
            }
        }
Exemple #2
0
        private void RemoveAttendeeScanIn(ScanInfo scanInfo, string scanId)
        {
            var removeEvent = new AttendeeScanInRemoved(scanInfo)
            {
                ScanId = scanId
            };

            this.Apply(removeEvent);
        }
Exemple #3
0
 public void When(AttendeeScanInRemoved e) => PublishToClients(e);
Exemple #4
0
 public void When(AttendeeScanInRemoved e)
 {
     this.ReadingsIn.RemoveAll(r => r.PersonId.Equals(e.PersonId, StringComparison.OrdinalIgnoreCase));
 }
 public void When(AttendeeScanInRemoved e)
 {
     RemoveScanEvent(e);
 }