-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CM-38979 - Add the ability to cancel scans (#19)
- Loading branch information
Showing
5 changed files
with
70 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletions
13
src/extension/Cycode.VisualStudio.Extension.Shared/Services/ICliService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using TaskCancelledCallback = System.Func<bool>; | ||
|
||
namespace Cycode.VisualStudio.Extension.Shared.Services; | ||
|
||
public interface ICliService { | ||
Task<bool> HealthCheckAsync(TaskCancelledCallback cancelledCallback = null); | ||
Task<bool> CheckAuthAsync(TaskCancelledCallback cancelledCallback = null); | ||
Task<bool> DoAuthAsync(TaskCancelledCallback cancelledCallback = null); | ||
Task<bool> HealthCheckAsync(CancellationToken cancellationToken = default); | ||
Task<bool> CheckAuthAsync(CancellationToken cancellationToken = default); | ||
Task<bool> DoAuthAsync(CancellationToken cancellationToken = default); | ||
|
||
Task ScanPathsSecretsAsync( | ||
List<string> paths, bool onDemand = true, TaskCancelledCallback cancelledCallback = null | ||
List<string> paths, bool onDemand = true, CancellationToken cancellationToken = default | ||
); | ||
|
||
Task ScanPathsScaAsync( | ||
List<string> paths, bool onDemand = true, TaskCancelledCallback cancelledCallback = null | ||
List<string> paths, bool onDemand = true, CancellationToken cancellationToken = default | ||
); | ||
} |