Public Access
feat: detect host operating system at startup and provide platform-specific guidance
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
namespace MeetingAssistant;
|
||||
|
||||
public enum HostOperatingSystemKind
|
||||
{
|
||||
Windows,
|
||||
MacOS,
|
||||
Unsupported
|
||||
}
|
||||
|
||||
public sealed record HostOperatingSystem(HostOperatingSystemKind Kind)
|
||||
{
|
||||
public static HostOperatingSystem DetectCurrent()
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
return new HostOperatingSystem(HostOperatingSystemKind.Windows);
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
return new HostOperatingSystem(HostOperatingSystemKind.MacOS);
|
||||
}
|
||||
|
||||
return new HostOperatingSystem(HostOperatingSystemKind.Unsupported);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user