public SteamApp GetSteamAppById(int appId, bool noCache = false) { if (!SteamFound) { throw new NotFoundException("Unable to get Steam App, Steam was not found."); } try { SteamApp app = null; if (noCache || !_appCache.ContainsKey(appId)) { app = new SteamApp(appId, GetAppManifestLocation(appId), TryGetConfigByAppId(appId)); if (app.InstallBase != null) { _appCache[appId] = app; } } else { app = _appCache[appId]; } return(app); } catch (Exception e) { MainLog.Logger.FormattedWarnException(e, "Unknown Exception Attempting to get Steam App"); return(new SteamApp(appId, null, null)); } }
public SteamApp GetSteamAppById(int appId, bool noCache = false) { if (!SteamFound) throw new NotFoundException("Unable to get Steam App, Steam was not found."); try { SteamApp app = null; if (noCache || !_appCache.ContainsKey(appId)) { app = new SteamApp(appId, GetAppManifestLocation(appId), TryGetConfigByAppId(appId)); if (app.InstallBase != null) _appCache[appId] = app; } else app = _appCache[appId]; return app; } catch (Exception e) { MainLog.Logger.FormattedWarnException(e, "Unknown Exception Attempting to get Steam App"); return new SteamApp(appId, null, null); } }