private BatchRunResponse execute(Action<RunInput> configure)
{
var path = ".".ToFullPath().ParentDirectory().ParentDirectory().ParentDirectory()
.AppendPath("Storyteller.Samples");
var input = new RunInput
{
Path = path
};
configure(input);
var controller = input.BuildRemoteController();
var task = controller.Start(EngineMode.Batch).ContinueWith(t =>
{
var systemRecycled = t.Result;
if (!systemRecycled.success)
{
systemRecycled.WriteSystemUsage();
throw new Exception("Unable to start the system");
}
return input.StartBatch(controller);
});
task.Wait();
task.Result.Wait();
return task.Result.Result;
}