public bool CheckGame(GameModel model)
{
if (model == null) {
throw new ArgumentException("model argument cannot be null");
}
IConfiguration config = GetConfiguration(model);
string pGamePath = GetGamePath(model);
if (string.IsNullOrEmpty(pGamePath)) {
return false;
}
new FileIOPermission(FileIOPermissionAccess.Read, pGamePath).Assert();
if (!File.Exists(Path.Combine(pGamePath, config.VersionLocalPath)) || !File.Exists(Path.Combine(pGamePath, config.GameExecutable))) {
return false;
}
if (!File.Exists(Path.Combine(pGamePath, puPF)) || !File.Exists(Path.Combine(pGamePath, puHF))) {
return false;
}
return true;
}