private static string GetProbingFilePath(ProbedPath.PathSource pathSource, string assemblyName, bool isExe, string culture, string baseAssemblyDirectory) { string baseDirectory = baseAssemblyDirectory ?? Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); if (!string.IsNullOrEmpty(culture)) { baseDirectory = Path.Combine(baseDirectory, culture); } string extension = isExe ? "exe" : "dll"; switch (pathSource) { case ProbedPath.PathSource.AppPaths: case ProbedPath.PathSource.SatelliteSubdirectory: return(Path.Combine(baseDirectory, $"{assemblyName}.{extension}")); default: throw new ArgumentOutOfRangeException(nameof(pathSource)); } }
public static string GetProbingFilePath(ProbedPath.PathSource pathSource, string assemblyName, bool isExe) { return(GetProbingFilePath(pathSource, assemblyName, isExe, null, null)); }
public static string GetProbingFilePath(ProbedPath.PathSource pathSource, string assemblyName, string culture, string baseAssemblyDirectory = null) { return(GetProbingFilePath(pathSource, assemblyName, false, culture, baseAssemblyDirectory)); }