Example #1
0
        ///<inheritdoc/>
        public ITask <string> Discard(IList <string> files)
        {
            GitCheckoutTask last = null;

            foreach (var batch in files.Spool(SpoolLength))
            {
                var current = new GitCheckoutTask(platform, batch, Token).Configure(platform.ProcessManager);
                if (last == null)
                {
                    last = current;
                }
                else
                {
                    last.Then(current);
                    last = current;
                }
            }

            return(last);
        }
Example #2
0
        ///<inheritdoc/>
        public ITask <string> Discard(IList <string> files,
                                      IOutputProcessor <string> processor = null)
        {
            GitCheckoutTask last = null;

            foreach (var batch in files.Spool(5000))
            {
                var current = new GitCheckoutTask(batch, cancellationToken, processor).Configure(processManager);
                if (last == null)
                {
                    last = current;
                }
                else
                {
                    last.Then(current);
                    last = current;
                }
            }

            return(last);
        }