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