revert to VB and update to new project file format

This commit is contained in:
schedpas
2020-09-25 09:04:15 +02:00
parent 04869b2814
commit 9feaf658be
313 changed files with 9895 additions and 17566 deletions

View File

@@ -1,10 +0,0 @@
namespace Pilz.Runtime
{
public enum OSType
{
Windows,
Linux,
OSX
}
}

9
Pilz/Runtime/OSType.vb Normal file
View File

@@ -0,0 +1,9 @@
Namespace Runtime
Public Enum OSType
Windows
Linux
OSX
End Enum
End Namespace

View File

@@ -1,32 +0,0 @@
using global::System.Runtime.InteropServices;
namespace Pilz.Runtime
{
public static class RuntimeInformationsEx
{
private static OSType? oSType = null;
public static OSType OSType
{
get
{
if (oSType is null)
{
switch (true)
{
case object _ when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
oSType = OSType.Windows;
break;
case object _ when RuntimeInformation.IsOSPlatform(OSPlatform.Linux):
oSType = OSType.Linux;
break;
case object _ when RuntimeInformation.IsOSPlatform(OSPlatform.OSX):
oSType = OSType.OSX;
break;
}
}
return (OSType)OSType;
}
}
}
}

View File

@@ -0,0 +1,28 @@
Imports System.Runtime.InteropServices
Namespace Runtime
Public Module RuntimeInformationsEx
Public ReadOnly Property OSType As OSType
Get
Static t As OSType? = Nothing
If t Is Nothing Then
Select Case True
Case RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
t = OSType.Windows
Case RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
t = OSType.Linux
Case RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
t = OSType.OSX
End Select
End If
Return t
End Get
End Property
End Module
End Namespace