private void LoadChangesets(ITfsBranch sourceBranch, ITfsBranch targetBranch, string sourcePathFilter, BackgroundTask task) { task.TrackProgress.ProgressInfo = "Loading merge candidates ..."; var changesets = new ObservableCollection <TfsChangesetWrapper>(TfsItemCache.QueryChangesets(sourceBranch, targetBranch, sourcePathFilter)); Repository.Instance.BackgroundTaskManager.Post( () => { if (!task.Cancelled.IsCancellationRequested) { SetContent(changesets); } return(true); }); }
private void LoadWorkItems(ITfsBranch sourceBranch, ITfsBranch targetBranch, string pathFilter, BackgroundTask task) { task.TrackProgress.ProgressInfo = "Loading merge candidates ..."; var changesets = new List <TfsChangesetWrapper>(TfsItemCache.QueryChangesets(sourceBranch, targetBranch, pathFilter)); task.TrackProgress.ProgressInfo = "Loading work items ..."; task.TrackProgress.MaxProgress = changesets.Count; var workItems = new ObservableCollection <TfsWorkItemWrapper>( TfsItemCache.QueryWorkItems(changesets, task.TrackProgress, task.Cancelled.Token)); Repository.Instance.BackgroundTaskManager.Post( () => { if (!task.Cancelled.IsCancellationRequested) { SetContent(workItems); } return(true); }); }
private void LoadChangesets(ITfsQuery query, BackgroundTask task) { task.TrackProgress.ProgressInfo = "Loading work items ..."; var workItems = new List <TfsWorkItemWrapper>( TfsItemCache.QueryWorkItems(query)); task.TrackProgress.ProgressInfo = "Loading changesets ..."; task.TrackProgress.MaxProgress = workItems.Count; var changesets = new ObservableCollection <TfsChangesetWrapper>( TfsItemCache.QueryChangesets(workItems, task.TrackProgress, task.Cancelled.Token)); Repository.Instance.BackgroundTaskManager.Post( () => { if (!task.Cancelled.IsCancellationRequested) { SetContent(changesets); } return(true); }); }