This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new aeb8964 THRIFT-5407: Minor changes in .NET to support netcoreapp3.1
Client: netstd Patch: Mario Emmenlauer
aeb8964 is described below
commit aeb8964dda7128a1f6090c3fc3d8091f6f0b45c4
Author: Mario Emmenlauer <[email protected]>
AuthorDate: Wed May 5 10:50:02 2021 +0200
THRIFT-5407: Minor changes in .NET to support netcoreapp3.1
Client: netstd
Patch: Mario Emmenlauer
This closes #2384
---
test/netstd/Client/Client.csproj | 1 +
test/netstd/Client/Program.cs | 7 +++----
test/netstd/Server/Program.cs | 5 ++---
test/netstd/Server/Server.csproj | 1 +
tutorial/netstd/Client/Client.csproj | 1 +
tutorial/netstd/Server/Server.csproj | 1 +
6 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/test/netstd/Client/Client.csproj b/test/netstd/Client/Client.csproj
index 828ea73..d3504d4 100644
--- a/test/netstd/Client/Client.csproj
+++ b/test/netstd/Client/Client.csproj
@@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
+ <LangVersion>9.0</LangVersion>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>
diff --git a/test/netstd/Client/Program.cs b/test/netstd/Client/Program.cs
index 7e502cd..bcc02a2 100644
--- a/test/netstd/Client/Program.cs
+++ b/test/netstd/Client/Program.cs
@@ -18,6 +18,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Runtime.InteropServices;
using ThriftTest;
namespace Client
@@ -26,8 +27,8 @@ namespace Client
{
public static int Main(string[] args)
{
- if (OperatingSystem.IsWindows())
- {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
try
{
Console.SetBufferSize(Console.BufferWidth, 4096);
@@ -69,5 +70,3 @@ namespace Client
}
}
}
-
-
diff --git a/test/netstd/Server/Program.cs b/test/netstd/Server/Program.cs
index 0052bce..8f1f36d 100644
--- a/test/netstd/Server/Program.cs
+++ b/test/netstd/Server/Program.cs
@@ -18,6 +18,7 @@
using System;
using System.Linq;
using System.Collections.Generic;
+using System.Runtime.InteropServices;
using ThriftTest;
namespace Server
@@ -26,7 +27,7 @@ namespace Server
{
public static int Main(string[] args)
{
- if (OperatingSystem.IsWindows())
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
try
{
@@ -65,5 +66,3 @@ namespace Server
}
}
}
-
-
diff --git a/test/netstd/Server/Server.csproj b/test/netstd/Server/Server.csproj
index fe1c394..e2ec93c 100644
--- a/test/netstd/Server/Server.csproj
+++ b/test/netstd/Server/Server.csproj
@@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
+ <LangVersion>9.0</LangVersion>
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>
diff --git a/tutorial/netstd/Client/Client.csproj
b/tutorial/netstd/Client/Client.csproj
index 8a923e1..e91b7a9 100644
--- a/tutorial/netstd/Client/Client.csproj
+++ b/tutorial/netstd/Client/Client.csproj
@@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
+ <LangVersion>9.0</LangVersion>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>
diff --git a/tutorial/netstd/Server/Server.csproj
b/tutorial/netstd/Server/Server.csproj
index 9da3249..b63967b 100644
--- a/tutorial/netstd/Server/Server.csproj
+++ b/tutorial/netstd/Server/Server.csproj
@@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
+ <LangVersion>9.0</LangVersion>
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>