@@ -208,14 +208,14 @@ public async Task resetUploadBytes()
208208 public void setDownloadSpeed ( String speed )
209209 {
210210 downloadSpeed = speed ;
211- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
211+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
212212 }
213213
214214 public void setUploadSpeed ( String speed )
215215 {
216216 //_logger.LogInformation("Set bytes speed upload {0}", speed);
217217 uploadSpeed = speed ;
218- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
218+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
219219 }
220220
221221 public void addToDownloadList ( DownloadModel downloadModel )
@@ -235,7 +235,7 @@ public void addToDownloadList(DownloadModel downloadModel)
235235 downloadModels . Insert ( 0 , downloadModel ) ;
236236 PendingDownloadMutex . ReleaseMutex ( ) ;
237237 EventChanged ? . Invoke ( this , new EventArgs ( ) ) ;
238- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
238+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
239239 }
240240
241241 public void addToPendingDownloadList ( DownloadModel downloadModel , bool atFirst = false , bool chekDownloads = true )
@@ -274,7 +274,7 @@ public void PauseDownloads()
274274 dm . Pause ( ) ;
275275 }
276276 PendingDownloadMutex . ReleaseMutex ( ) ;
277- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
277+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
278278 }
279279
280280 public void PlayDownloads ( )
@@ -298,7 +298,7 @@ public void StopDownloads()
298298 }
299299 pendingDownloadModels . Clear ( ) ;
300300 PendingDownloadMutex . ReleaseMutex ( ) ;
301- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
301+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
302302 }
303303
304304 public async Task CheckPendingDownloads ( )
@@ -317,7 +317,7 @@ public async Task CheckPendingDownloads()
317317 }
318318 PendingDownloadMutex . ReleaseMutex ( ) ;
319319 EventChanged ? . Invoke ( this , new EventArgs ( ) ) ;
320- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
320+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
321321 }
322322
323323 public async Task CheckPendingUploadInfoTasks ( )
@@ -333,7 +333,7 @@ public async Task CheckPendingUploadInfoTasks()
333333 }
334334 PendingUploadInfoTaskMutex . ReleaseMutex ( ) ;
335335 EventChanged ? . Invoke ( this , new EventArgs ( ) ) ;
336- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
336+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
337337 }
338338
339339 public void addToUploadList ( UploadModel uploadModel )
@@ -350,14 +350,14 @@ public void addToUploadList(UploadModel uploadModel)
350350 uploadModel . name , uploadModel . _size / ( 1024.0 * 1024.0 ) ) ;
351351 uploadModels . Insert ( 0 , uploadModel ) ;
352352 EventChanged ? . Invoke ( this , new EventArgs ( ) ) ;
353- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
353+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
354354 }
355355
356356 public void deleteUploadInList ( UploadModel uploadModel )
357357 {
358358 uploadModels . Remove ( uploadModel ) ;
359359 EventChanged ? . Invoke ( this , new EventArgs ( ) ) ;
360- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
360+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
361361 }
362362
363363 public void addToInfoDownloadTaskList ( InfoDownloadTaksModel infoDownloadModel )
@@ -433,7 +433,7 @@ public void deleteDownloadInList(DownloadModel downloadModel)
433433 downloadModels . Remove ( downloadModel ) ;
434434 PendingDownloadMutex . ReleaseMutex ( ) ;
435435 EventChanged ? . Invoke ( this , new EventArgs ( ) ) ;
436- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
436+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
437437 }
438438
439439 public void deletePendingDownloadInList ( DownloadModel downloadModel )
@@ -442,7 +442,7 @@ public void deletePendingDownloadInList(DownloadModel downloadModel)
442442 pendingDownloadModels . Remove ( downloadModel ) ;
443443 PendingDownloadMutex . ReleaseMutex ( ) ;
444444 EventChanged ? . Invoke ( this , new EventArgs ( ) ) ;
445- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
445+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
446446 }
447447
448448 public void ClearPendingDownloads ( )
@@ -452,7 +452,7 @@ public void ClearPendingDownloads()
452452 pendingDownloadModels . Clear ( ) ;
453453 PendingDownloadMutex . ReleaseMutex ( ) ;
454454 EventChanged ? . Invoke ( this , new EventArgs ( ) ) ;
455- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
455+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
456456 }
457457
458458 public void ClearPendingUploads ( )
@@ -471,7 +471,7 @@ public void deleteInfoDownloadTaskFromList(InfoDownloadTaksModel idt)
471471 infoDownloadTaksModel . Remove ( idt ) ;
472472 PendingUploadInfoTaskMutex . ReleaseMutex ( ) ;
473473 EventChanged ? . Invoke ( this , new EventArgs ( ) ) ;
474- TaskEventChanged . Invoke ( null , EventArgs . Empty ) ;
474+ TaskEventChanged ? . Invoke ( null , EventArgs . Empty ) ;
475475 }
476476
477477 public List < InfoDownloadTaksModel > getInfoDownloadTaksModel ( int pageNumber , int pageSize )
0 commit comments