Public Access
27 lines
602 B
C#
27 lines
602 B
C#
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);
|
|
}
|
|
}
|