| 1 | namespace Zipelo.Runtime; |
| 2 | |
| 3 | public static class WorkerPlatform |
| 4 | { |
| 5 | public static string ExecutableName => OperatingSystem.IsWindows() ? "Zipelo.Worker.exe" : |
| 6 | OperatingSystem.IsLinux() ? "Zipelo.Worker" : throw new PlatformNotSupportedException(); |
| 7 | |
| 8 | public static string GetWorkerPath(string applicationDirectory) |
| 9 | { |
| 10 | if (!Path.IsPathFullyQualified(applicationDirectory)) |
| 11 | { |
| 12 | throw new ArgumentException("앱 설치 폴더의 절대 경로가 필요함", nameof(applicationDirectory)); |
| 13 | } |
| 14 | return Path.Combine(applicationDirectory, "worker", ExecutableName); |
| 15 | } |
| 16 | } |