Не то закоммитил, вместо ThrowIfCancellationRequested, просто return

This commit is contained in:
rutriff
2019-03-14 12:52:38 +03:00
parent 6c6d4000c7
commit b0793912bb
@@ -27,7 +27,10 @@ namespace JiraTimeBotForm.TaskTime
foreach (var repoDirectory in Directory.GetDirectories(settings.RepositoryPath)) foreach (var repoDirectory in Directory.GetDirectories(settings.RepositoryPath))
{ {
cancellationToken.ThrowIfCancellationRequested(); if (cancellationToken.IsCancellationRequested)
{
return workTimeItems;
}
//var project = new DirectoryInfo(repoDirectory).Name; //var project = new DirectoryInfo(repoDirectory).Name;
if (!Directory.Exists(Path.Combine(repoDirectory, ".hg"))) if (!Directory.Exists(Path.Combine(repoDirectory, ".hg")))
@@ -46,7 +49,10 @@ namespace JiraTimeBotForm.TaskTime
foreach (var changeset in log) foreach (var changeset in log)
{ {
cancellationToken.ThrowIfCancellationRequested(); if (cancellationToken.IsCancellationRequested)
{
return workTimeItems;
}
if (!changeset.Branch.Contains("-")) if (!changeset.Branch.Contains("-"))
{ {