use System.Environment.OSVersion in .net standard (#7831)

This commit is contained in:
William Cheng
2020-10-29 10:54:09 +08:00
committed by GitHub
parent 0e994eabf7
commit a8bd859397
2 changed files with 2 additions and 6 deletions
@@ -499,13 +499,8 @@ namespace {{packageName}}.Client
public static String ToDebugReport()
{
String report = "C# SDK ({{{packageName}}}) Debug Report:\n";
{{^netStandard}}
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
{{/netStandard}}
{{#netStandard}}
report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n";
{{/netStandard}}
report += " Version of the API: {{{version}}}\n";
report += " SDK Package Version: {{{packageVersion}}}\n";
@@ -514,7 +514,8 @@ namespace Org.OpenAPITools.Client
public static String ToDebugReport()
{
String report = "C# SDK (Org.OpenAPITools) Debug Report:\n";
report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n";
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 1.0.0\n";
report += " SDK Package Version: 1.0.0\n";