Change #ifdefs
This commit is contained in:
parent
97a5149dd9
commit
e81c5adce2
|
|
@ -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<object>(null);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue