/// <summary> /// Loads test cases. /// </summary> public async Task LoadAsync(ITfsProjectWorkItemCollection projectworkItemCollection) { TestCases.Clear(); var progress = new Progress <ITestCaseViewModel>(testCase => TestCases.Add(testCase)); await QueryTestCases(projectworkItemCollection, progress); }
private Task QueryTestCases(ITfsProjectWorkItemCollection workItems, IProgress<ITestCaseViewModel> progress) { return Task.Factory.StartNew(() => { var testCases = workItems.TestCases().AsTestCases().Select(tc => _testCaseFactory(tc)); foreach (var testCase in testCases) progress.Report(testCase); }, CancellationToken.None, TaskCreationOptions.None, _scheduler); }
private Task QueryTestCases(ITfsProjectWorkItemCollection workItems, IProgress <ITestCaseViewModel> progress) { return(Task.Factory.StartNew(() => { var testCases = workItems.TestCases().AsTestCases().Select(tc => _testCaseFactory(tc)); foreach (var testCase in testCases) { progress.Report(testCase); } }, CancellationToken.None, TaskCreationOptions.None, _scheduler)); }
/// <summary> /// Loads test cases. /// </summary> public async Task LoadAsync(ITfsProjectWorkItemCollection projectworkItemCollection) { TestCases.Clear(); var progress = new Progress<ITestCaseViewModel>(testCase => TestCases.Add(testCase)); await QueryTestCases(projectworkItemCollection, progress); }