From e81c5adce243055328aa8644a9853c196fdf9978 Mon Sep 17 00:00:00 2001 From: Henk Mollema Date: Sat, 2 Jan 2016 10:41:08 +0100 Subject: [PATCH] Change #ifdefs --- .../Infrastructure/TaskUtilities.cs | 2 +- src/Microsoft.AspNet.Server.Kestrel/Networking/Libuv.cs | 7 +------ .../Networking/PlatformApis.cs | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Microsoft.AspNet.Server.Kestrel/Infrastructure/TaskUtilities.cs b/src/Microsoft.AspNet.Server.Kestrel/Infrastructure/TaskUtilities.cs index e67ded5acb..f333e69a4b 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/Infrastructure/TaskUtilities.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/Infrastructure/TaskUtilities.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Infrastructure { public static class TaskUtilities { -#if DOTNET5_4 || DNXCORE50 +#if DOTNET5_4 public static Task CompletedTask = Task.CompletedTask; #else public static Task CompletedTask = Task.FromResult(null); diff --git a/src/Microsoft.AspNet.Server.Kestrel/Networking/Libuv.cs b/src/Microsoft.AspNet.Server.Kestrel/Networking/Libuv.cs index 2f6a74fced..497a6c42a0 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/Networking/Libuv.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/Networking/Libuv.cs @@ -12,12 +12,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking { IsWindows = PlatformApis.IsWindows; - var isDarwinMono = -#if DNX451 - IsWindows ? false : PlatformApis.IsDarwin; -#else - false; -#endif + var isDarwinMono = !IsWindows && PlatformApis.IsDarwin; if (isDarwinMono) { diff --git a/src/Microsoft.AspNet.Server.Kestrel/Networking/PlatformApis.cs b/src/Microsoft.AspNet.Server.Kestrel/Networking/PlatformApis.cs index 6117520b3f..ae8ce0383f 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/Networking/PlatformApis.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/Networking/PlatformApis.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking { static PlatformApis() { -#if DOTNET5_4 || DNXCORE50 +#if DOTNET5_4 IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); IsDarwin = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); #else