Esempio n. 1
0
 public static void ExecuteTask(BackgroundTask task)
 {
     for (var i = 0; i < 10; i++)
     {
         using (var session = _documentStore.OpenSession())
         {
             switch (task.Run(session))
             {
                 case true:
                 case false:
                     return;
                 case null:
                     break;
             }
         }
     }
 }
Esempio n. 2
0
 public static void ExcuteLater(BackgroundTask task)
 {
     tasksToExecute.Value.Add(task);
 }