예제 #1
0
        public bool CompleteDocument(SrmDocument document, MultiFileLoadMonitor loadMonitor)
        {
            // Refuse completion, if anything is still not final
            var status   = Status;
            var notFinal = status.ProgressList.Where(s => !s.IsFinal).ToArray();

            if (notFinal.Any())
            {
                // Write output in attempt to associate new hangs in nightly tests with the return false below
                Console.WriteLine(TextUtil.LineSeparate("*** Attempt to complete document with non-final status ***",                                                           // Not L10N
                                                        TextUtil.LineSeparate(notFinal.Select(s => string.Format("{0} {1}% - {2}", s.State, s.PercentComplete, s.FilePath))))); // Not L10N
                return(false);
            }

            if (status.ProgressList.Any())
            {
                loadMonitor.UpdateProgress(CompleteStatus());
            }
            ClearDocument(document);
            return(true);
        }
예제 #2
0
 public override UpdateProgressResponse UpdateProgress(IProgressStatus status)
 {
     return(_loadMonitor.UpdateProgress(status));
 }