Merge branch 'henkollema/projectjson' into dev
This commit is contained in:
commit
f32f1c4440
|
|
@ -7,7 +7,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Infrastructure
|
||||||
{
|
{
|
||||||
public static class TaskUtilities
|
public static class TaskUtilities
|
||||||
{
|
{
|
||||||
#if DOTNET5_4 || DNXCORE50
|
#if DOTNET5_4
|
||||||
public static Task CompletedTask = Task.CompletedTask;
|
public static Task CompletedTask = Task.CompletedTask;
|
||||||
#else
|
#else
|
||||||
public static Task CompletedTask = Task.FromResult<object>(null);
|
public static Task CompletedTask = Task.FromResult<object>(null);
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking
|
||||||
{
|
{
|
||||||
IsWindows = PlatformApis.IsWindows;
|
IsWindows = PlatformApis.IsWindows;
|
||||||
|
|
||||||
var isDarwinMono =
|
var isDarwinMono = PlatformApis.IsDarwin && PlatformApis.IsMono;
|
||||||
#if DNX451
|
|
||||||
IsWindows ? false : PlatformApis.IsDarwin;
|
|
||||||
#else
|
|
||||||
false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (isDarwinMono)
|
if (isDarwinMono)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using Microsoft.Extensions.PlatformAbstractions;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Server.Kestrel.Networking
|
namespace Microsoft.AspNet.Server.Kestrel.Networking
|
||||||
{
|
{
|
||||||
|
|
@ -10,7 +11,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking
|
||||||
{
|
{
|
||||||
static PlatformApis()
|
static PlatformApis()
|
||||||
{
|
{
|
||||||
#if DOTNET5_4 || DNXCORE50
|
#if DOTNET5_4
|
||||||
IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||||
IsDarwin = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
|
IsDarwin = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
|
||||||
#else
|
#else
|
||||||
|
|
@ -24,12 +25,16 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking
|
||||||
IsDarwin = string.Equals(GetUname(), "Darwin", StringComparison.Ordinal);
|
IsDarwin = string.Equals(GetUname(), "Darwin", StringComparison.Ordinal);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
IsMono = PlatformServices.Default.Runtime.RuntimeType == "Mono";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsWindows { get; }
|
public static bool IsWindows { get; }
|
||||||
|
|
||||||
public static bool IsDarwin { get; }
|
public static bool IsDarwin { get; }
|
||||||
|
|
||||||
|
public static bool IsMono { get; }
|
||||||
|
|
||||||
[DllImport("libc")]
|
[DllImport("libc")]
|
||||||
static extern int uname(IntPtr buf);
|
static extern int uname(IntPtr buf);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
namespace Microsoft.AspNet.Server.Kestrel
|
|
||||||
{
|
|
||||||
public class StandardsPoliceCompileModule : Microsoft.StandardsPolice.StandardsPoliceCompileModule
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNet.Hosting": "1.0.0-*",
|
"Microsoft.AspNet.Hosting": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*",
|
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*",
|
||||||
|
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
|
||||||
"System.Numerics.Vectors": "4.1.1-*",
|
"System.Numerics.Vectors": "4.1.1-*",
|
||||||
"Microsoft.StandardsPolice": {
|
"Microsoft.StandardsPolice": {
|
||||||
"version": "1.0.0-*",
|
"version": "1.0.0-*",
|
||||||
|
|
@ -24,28 +25,7 @@
|
||||||
"System.Threading.Tasks.Extensions": "4.0.0-*"
|
"System.Threading.Tasks.Extensions": "4.0.0-*"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnx451": { },
|
|
||||||
"net451": { },
|
"net451": { },
|
||||||
"dnxcore50": {
|
|
||||||
"dependencies": {
|
|
||||||
"System.Collections": "4.0.11-*",
|
|
||||||
"System.Diagnostics.Debug": "4.0.11-*",
|
|
||||||
"System.Diagnostics.TraceSource": "4.0.0-*",
|
|
||||||
"System.Diagnostics.Tracing": "4.0.21-*",
|
|
||||||
"System.Globalization": "4.0.11-*",
|
|
||||||
"System.IO": "4.0.11-*",
|
|
||||||
"System.Linq": "4.0.1-*",
|
|
||||||
"System.Net.Primitives": "4.0.11-*",
|
|
||||||
"System.Runtime.Extensions": "4.0.11-*",
|
|
||||||
"System.Runtime.InteropServices": "4.0.21-*",
|
|
||||||
"System.Text.Encoding": "4.0.11-*",
|
|
||||||
"System.Threading": "4.0.11-*",
|
|
||||||
"System.Threading.Tasks": "4.0.11-*",
|
|
||||||
"System.Threading.Thread": "4.0.0-*",
|
|
||||||
"System.Threading.ThreadPool": "4.0.10-*",
|
|
||||||
"System.Threading.Timer": "4.0.1-*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dotnet5.4": {
|
"dotnet5.4": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.Collections": "4.0.11-*",
|
"System.Collections": "4.0.11-*",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue