public Task StopAsync(CancellationToken cancellationToken) { BackupWorker.Stop(); BackupListener.Stop(); if (CleanerService != null) { CleanerService.Stop(); CleanerService = null; } if (SchedulerService != null) { SchedulerService.Stop(); SchedulerService = null; } return(Task.CompletedTask); }
public void Stop() { BackupWorker.Stop(); if (host != null) { host.Close(); host = null; } if (cleanerService != null) { cleanerService.Stop(); cleanerService = null; } if (schedulerService != null) { schedulerService.Stop(); schedulerService = null; } }