public CheckLauncher ( |
||
model | ||
return | bool |
public bool CheckLauncher(GameModel model)
{
if (model == null) {
throw new ArgumentException("model argument cannot be null");
}
IConfiguration config = GetConfiguration(model);
string pLauncherPath = GetLauncherPath(model);
if (string.IsNullOrEmpty(pLauncherPath)) {
return false;
}
new FileIOPermission(FileIOPermissionAccess.Read, pLauncherPath).Assert();
if (!File.Exists(Path.Combine(pLauncherPath, config.LauncherExecutable))) {
return false;
}
return true;
}