Exemplo n.º 1
0
 public static void ExecuteTask(ExecutableTask task)
 {
     for (var i = 0; i < 10; i++)
     {
         switch (task.Run())
         {
             case true:
             case false:
                 return;
             case null:
                 break;
         }
     }
 }
Exemplo n.º 2
0
        public static void ExecuteTask(ExecutableTask task)
        {
            var docStore = global::Nancy.TinyIoc.TinyIoCContainer.Current.Resolve <DocumentStore>();

            for (var i = 0; i < 10; i++)
            {
                using (var session = docStore.OpenSession())
                {
                    switch (task.Run(session))
                    {
                    case true:
                    case false:
                        return;

                    case null:
                        break;
                    }
                }
            }
        }
Exemplo n.º 3
0
 public static void ExcuteLater(ExecutableTask task)
 {
     tasksToExecute.Value.Add(task);
 }
Exemplo n.º 4
0
 public static void ExcuteLater(ExecutableTask task)
 {
     tasksToExecute.Value.Add(task);
 }