Hpdi.Vss2Git.WorkQueue.FetchExceptions C# (CSharp) Метод

FetchExceptions() публичный Метод

public FetchExceptions ( ) : ICollection
Результат ICollection
        public ICollection<Exception> FetchExceptions()
        {
            lock (workExceptions)
            {
                if (workExceptions.Count > 0)
                {
                    var result = new List<Exception>(workExceptions);
                    workExceptions.Clear();
                    return result;
                }
            }
            return null;
        }

Usage Example

Пример #1
0
        private void statusTimer_Tick(object sender, EventArgs e)
        {
            statusLabel.Text = workQueue.LastStatus ?? "Idle";
            timeLabel.Text   = string.Format("Elapsed: {0:HH:mm:ss}",
                                             new DateTime(workQueue.ActiveTime.Ticks));

            if (revisionAnalyzer != null)
            {
                fileLabel.Text     = "Files: " + revisionAnalyzer.FileCount;
                revisionLabel.Text = "Revisions: " + revisionAnalyzer.RevisionCount;
            }

            if (changesetBuilder != null)
            {
                changeLabel.Text = "Changesets: " + changesetBuilder.Changesets.Count;
                if (changesetBuilder.Changesets.Count > 1)
                {
                    AdvancedTaskbar.EnableProgress((uint)changesetBuilder.Changesets.Count);
                }
            }

            if (workQueue.IsIdle)
            {
                revisionAnalyzer = null;
                changesetBuilder = null;

                statusTimer.Enabled = false;
                if (!goButton.Enabled)
                {
                    LoadRepoSettings();
                }
                emailMap.Enabled = true;
                goButton.Enabled = true;
                AdvancedTaskbar.Disable();
                cancelButton.Text = "Close";
                if (goAndExit && exitOnComplete)
                {
                    exitOnComplete = false;
                    Close();
                }
            }

            var exceptions = workQueue.FetchExceptions();

            if (exceptions != null)
            {
                foreach (var exception in exceptions)
                {
                    ShowException(exception);
                }
            }
        }
All Usage Examples Of Hpdi.Vss2Git.WorkQueue::FetchExceptions