public async Task StartAsync(CancellationToken cancellationToken) { var repositories = _configuration.GetSection("Repositories").Get <string[]>() ?? new string[0]; var initialiseTasks = repositories.Select(x => _sourceControl.Add(x)); await Task.WhenAll(initialiseTasks); await HandleMessages(cancellationToken); await StopAsync(cancellationToken); }
public async Task Execute(dynamic command) { await _sourceControl.Add((string)command.Path); }