예제 #1
0
        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);
        }
예제 #2
0
        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);
                }
            }
        }