public async Task <bool> DownloadFileAsync(string SoftwareToDownload) { string downloadpath = @"C:\Users\Pedro\Downloads\"; var AvailableSoftwares = _infrasctructureFileOps.SerializeApps(); foreach (Software software in AvailableSoftwares) { if (software.Name == SoftwareToDownload) { await _infrasctructureFileDownload.DownloadFileToMachineAsync(software, downloadpath); return(true); } else { return(false); } } return(false); }
public async Task InstallSoftwareAsync(string fileName) { var AvailableSoftwares = _infrasctructureFileOps.SerializeApps(); foreach (Software software in AvailableSoftwares) { if (fileName == software.Name) { await _infrasctructureFileOps.RunProcessAsync(software.FileName, software.Silent); } } }