private Platform()
{
this.major = Environment.OSVersion.Version.Major;
this.minor = Environment.OSVersion.Version.Minor;
switch (Environment.OSVersion.Platform)
{
case PlatformID.Win32NT:
if (this.major == 5)
{
this.platformTypeValue = PlatformType.XP;
}
else if (this.major == 6)
{
this.platformTypeValue = PlatformType.Vista;
}
break;
// Thanks to a bug in Mono Mac and Linux will be treated the same https://bugzilla.novell.com/show_bug.cgi?id=515570 but adding this in case
case PlatformID.MacOSX:
this.platformTypeValue = PlatformType.MacOSX;
break;
case PlatformID.Unix:
this.platformTypeValue = PlatformType.Unix;
break;
}
}