コード例 #1
0
 private void RecordAttemptFailure(ConnectionState state, Exception ex)
 {
     if (Attempts.Any())
     {
         var attempt = Attempts.Last();
         attempt.FailedStates.Add(new AttemptFailedState(state, ex));
     }
 }
コード例 #2
0
 public void RecordAttemptFailure(ConnectionState state, Exception ex)
 {
     lock (_syncLock)
     {
         if (Attempts.Any())
         {
             var attempt = Attempts.Last();
             attempt.FailedStates.Add(new AttemptFailedState(state, ex));
         }
     }
 }
コード例 #3
0
 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);
     }
 }