public void ResumeSession()
 {
     using (var session = new PersistentAccumulatorSession())
     {
         session.Start();
         session.Suspend();
         session.Resume(1);
         Assert.AreEqual(1, session.Sum, "Incorrect sum");
     }
 }
예제 #2
0
 public int PersistentAccumulate(string sessionId, string number)
 {
     var session = new PersistentAccumulatorSession(sessionId);
     session.Resume(int.Parse(number));
     return session.Completed ? 0 : session.Sum;
 }