ST.CommandLine.RunInput.StartBatch C# (CSharp) Method

StartBatch() public method

public StartBatch ( IEngineController controller ) : Task
controller IEngineController
return Task
        public Task<BatchRunResponse> StartBatch(IEngineController controller)
        {
            var request = GetBatchRunRequest();
            return controller.Send(request).AndWaitFor<BatchRunResponse>();
        }
    }

Usage Example

        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;
        }
All Usage Examples Of ST.CommandLine.RunInput::StartBatch