static string GetLinuxChromePath(IFsAbstraction fsAbstratction) { if (fsAbstratction.FileExists(LinuxChromePath)) { return(LinuxChromePath); } foreach (string chromiumPath in LinuxChromiumPaths) { if (fsAbstratction.FileExists(chromiumPath)) { return(chromiumPath); } } throw new Exception("Chrome not found. Install Google Chrome or Chromium."); }
static string?GetBrowserPath(string[] tryPaths, IFsAbstraction fsAbstraction, bool allowFirefox) { foreach (var browserPath in tryPaths) { if (!allowFirefox && browserPath.Contains("firefox", StringComparison.OrdinalIgnoreCase)) { continue; } if (fsAbstraction.FileExists(browserPath)) { return(browserPath); } } return(null); }
public static string?GetBrowserPath(IFsAbstraction fsAbstraction, bool allowFirefox) { return(GetBrowserPath( fsAbstraction.IsMac ? MacChromePaths : fsAbstraction.IsUnixFs?LinuxChromePaths: WindowsBrowserPaths, fsAbstraction, allowFirefox)); }
public TranslationDb(IFsAbstraction fsAbstraction) { _fsAbstraction = fsAbstraction; }
public StrategyEnhancedBrowserProcessFactory(bool inDocker, string?strategy, IFsAbstraction fsAbstraction) { _inDocker = inDocker; _strategy = strategy ?? "default"; _fsAbstraction = fsAbstraction; }
public TranslationDb(IFsAbstraction fsAbstraction, ILogger logger) { _fsAbstraction = fsAbstraction; _logger = logger; }