public static IList<PotentialFile> FindFiles(NVidiaService service, string deviceToPatch) { var result = new List<PotentialFile>(); var deviceToReplace = long.Parse(deviceToPatch, System.Globalization.NumberStyles.HexNumber); var patternToLocate = BitConverter.GetBytes(deviceToReplace); if (service.ImagePath != null) { foreach (var file in Directory.GetFiles(service.ImagePath)) { var filePatcher = new FilePatcher(file, patternToLocate); if (filePatcher.Count != 2) { continue; } var potentialFile = new PotentialFile { Patcher = filePatcher, }; result.Add(potentialFile); } } return result; }
public static IList <PotentialFile> FindFiles(NVidiaService service, string deviceToPatch) { var result = new List <PotentialFile>(); var deviceToReplace = long.Parse(deviceToPatch, System.Globalization.NumberStyles.HexNumber); var patternToLocate = BitConverter.GetBytes(deviceToReplace); if (service.ImagePath != null) { foreach (var file in Directory.GetFiles(service.ImagePath)) { var filePatcher = new FilePatcher(file, patternToLocate); if (filePatcher.Count != 2) { continue; } var potentialFile = new PotentialFile { Patcher = filePatcher, }; result.Add(potentialFile); } } return(result); }