Run() public method

public Run ( ) : bool?
return bool?
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;
                    }
                }
            }
        }