private void RecordAttemptFailure(ConnectionState state, Exception ex) { if (Attempts.Any()) { var attempt = Attempts.Last(); attempt.FailedStates.Add(new AttemptFailedState(state, ex)); } }
public void RecordAttemptFailure(ConnectionState state, Exception ex) { lock (_syncLock) { if (Attempts.Any()) { var attempt = Attempts.Last(); attempt.FailedStates.Add(new AttemptFailedState(state, ex)); } } }
public Boolean CompiledBeforeDate(DateTime?before) { if (!before.HasValue) { return(Attempts.Any()); } else { dtoQuizAttemptInfo last = Attempts.Where(q => !q.CompletedOn.HasValue || q.CompletedOn <= before.Value).OrderByDescending(a => a.Id).ToList().FirstOrDefault(); return(last != null); } }