-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
68 extend engine to have pause resume cancel operations #72
68 extend engine to have pause resume cancel operations #72
Conversation
public class PauseTokenSource | ||
{ | ||
private volatile TaskCompletionSource<bool> _paused; | ||
private ILoggerFactory _factory; |
Check notice
Code scanning / CodeQL
Missed 'readonly' opportunity
{ | ||
private volatile TaskCompletionSource<bool> _paused; | ||
private ILoggerFactory _factory; | ||
private ILogger _log; |
Check notice
Code scanning / CodeQL
Missed 'readonly' opportunity
@@ -36,7 +38,10 @@ | |||
logging.AddSerilog(seriLog); | |||
}); | |||
|
|||
Engine.DownloadFile("https://www.google.com/images/branding/googlelogo/1x/googlelogo_light_color_272x92dp.png", factory, null, config).Wait(); | |||
var pauseTokenSource = new PauseTokenSource(factory); | |||
var cancelTokenSource = new CancellationTokenSource(); |
Check warning
Code scanning / CodeQL
Missing Dispose call on local IDisposable
config.DoneCallback(true); | ||
config.DoneCallback.Invoke(success); | ||
|
||
if (success == false) |
Check notice
Code scanning / CodeQL
Unnecessarily complex Boolean expression
Parts = 2, | ||
BufferSize = 8192, | ||
ShowProgress = false, | ||
DoneCallback = c => Assert.IsTrue(!File.Exists(outFile) || c == false), |
Check notice
Code scanning / CodeQL
Unnecessarily complex Boolean expression
Description
Please include a summary of the change and which issue number is fixed. Also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #68
Type of change
Explain the Testing instructions
Test Configuration:
Checklist:
Attach Screenshots