Skip to content

Commit 4e4f56f

Browse files
committed
perf: add cancelation token check inside the foreach sharing link
1 parent 5539845 commit 4e4f56f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/NovaPointLibrary/Solutions/Automation/RemoveSharingLinksAuto.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ private async Task ProcessSite(SPOTenantSiteUrlsRecord siteRecord)
8080
ProgressTracker progress = new(siteRecord.Progress, collGroups.Count);
8181
foreach (var oGroup in collGroups)
8282
{
83+
_appInfo.IsCancelled();
84+
8385
var record = await restSharingLinks.GetFromGroupAsync(siteRecord.SiteUrl, oGroup);
8486

8587
if (_param.SharingLinks.MatchFilters(record))

src/NovaPointLibrary/Solutions/Report/SharingLinksReport.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ private async Task ProcessSite(SPOTenantSiteUrlsRecord siteRecord)
8080
ProgressTracker groupProgress = new(siteRecord.Progress, collGroups.Count);
8181
foreach (Group oGroup in collGroups)
8282
{
83+
_appInfo.IsCancelled();
84+
8385
var record = await restSharingLinks.GetFromGroupAsync(siteRecord.SiteUrl, oGroup);
8486
if (_param.SharingLinks.MatchFilters(record))
8587
{

0 commit comments

Comments
 (0)