Example #1
0
 private EnsureSessionHistory _pure_getEnsureSessionHistory(HistoryRecord record, ImmutableDictionary <object, EnsureSessionHistory> ensures)
 {
     if (_ensureSessions.TryGetValue(record.Action, out var session))
     {
         return(session);
     }
     else
     {
         return(null);
     }
 }
Example #2
0
        public HistoryRecordVm ReadModel(HistoryRecord model, IDictionary <object, EnsureSessionHistory> ensureSessions)
        {
            Date          = model.Date;
            Caption       = model.Action.GetType().Name;
            ActionDetails = model.Action;
            PreviousState = model.PreviousState;
            NextState     = model.NextState;

            EnsureItemsCount = ensureSessions.TryGetValue(model.Action, out var value) ? value.Items.Count : 0;
            return(this);
        }