Example #1
0
        public async Task <ErrorResponse> Compile(FilePath targetPath, CancellationToken cancel)
        {
            var start = BuildStartInfoProvider.Construct(targetPath.Name.ToString());

            start.WorkingDirectory = targetPath.Directory !;

            var accumulator = OutputAccumulatorFactory();

            var result = await Dropoff.EnqueueAndWait(() =>
            {
                return(ProcessRunner.RunWithCallback(
                           start,
                           outputCallback: accumulator.Process,
                           errorCallback: e => {},
                           cancel: cancel));
            }, cancel).ConfigureAwait(false);

            if (result == 0)
            {
                return(ErrorResponse.Success);
            }

            return(ResultsProcessor.GetResults(
                       targetPath,
                       result,
                       cancel,
                       accumulator));
        }
Example #2
0
 public static bool IsMyShipyard(Dropoff d) => IsMyShipyard(d.position);