Browse Source

Code-cleanup: remove HAS_AWAIT as no longer needed

Oren Novotny 9 years ago
parent
commit
107b92296a

+ 0 - 2
Ix.NET/Source/System.Interactive.Async.Providers/project.json

@@ -35,7 +35,6 @@
     "net45": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "HAS_APTCA",
           "DESKTOPCLR",
           "DESKTOPCLR45"
@@ -45,7 +44,6 @@
     "netstandard1.0": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "CRIPPLED_REFLECTION",
           "PLIB"
         ]

+ 0 - 4
Ix.NET/Source/System.Interactive.Async/GroupJoin.cs

@@ -73,11 +73,7 @@ namespace System.Linq
                 {
                     cancellationToken.ThrowIfCancellationRequested();
 
-#if HAS_AWAIT
                     return Task.FromResult(_enumerator.MoveNext());
-#else
-                    return TaskEx.FromResult(_enumerator.MoveNext());
-#endif
                 }
 
                 public T Current => _enumerator.Current;

+ 0 - 4
Ix.NET/Source/System.Interactive.Async/project.json

@@ -34,7 +34,6 @@
     "net45": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "HAS_APTCA",
           "NO_ARRAY_EMPTY",
           "DESKTOPCLR",
@@ -45,7 +44,6 @@
     "net46": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "HAS_APTCA",
           "DESKTOPCLR",
           "DESKTOPCLR46"
@@ -55,7 +53,6 @@
     "netstandard1.0": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "NO_ARRAY_EMPTY",
           "CRIPPLED_REFLECTION",
           "PLIB"
@@ -65,7 +62,6 @@
     "netstandard1.3": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "CRIPPLED_REFLECTION",
           "PLIB"
         ]

+ 0 - 2
Ix.NET/Source/System.Interactive.Providers/project.json

@@ -35,7 +35,6 @@
     "net45": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "HAS_APTCA",
           "DESKTOPCLR",
           "DESKTOPCLR45"
@@ -45,7 +44,6 @@
     "netstandard1.0": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "CRIPPLED_REFLECTION",
           "PLIB"
         ]

+ 6 - 3
Ix.NET/Source/System.Interactive/IAwaitable.cs

@@ -1,8 +1,12 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if HAS_AWAIT
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
 using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
 
 namespace System.Linq
 {
@@ -16,5 +20,4 @@ namespace System.Linq
         bool IsCompleted { get; }
         void GetResult();
     }
-}
-#endif
+}

+ 0 - 2
Ix.NET/Source/System.Interactive/project.json

@@ -34,7 +34,6 @@
     "net45": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "HAS_APTCA",
           "DESKTOPCLR",
           "DESKTOPCLR45"
@@ -44,7 +43,6 @@
     "netstandard1.0": {
       "buildOptions": {
         "define": [
-          "HAS_AWAIT",
           "CRIPPLED_REFLECTION",
           "PLIB"
         ]

+ 1 - 2
Ix.NET/Source/Tests/Tests.Creation.cs

@@ -43,7 +43,6 @@ namespace Tests
             Assert.True(hot);
         }
 
-#if HAS_AWAIT
         [Fact]
         public void CreateYield()
         {
@@ -105,7 +104,7 @@ namespace Tests
 
             AssertThrows<NotSupportedException>(() => xs.GetEnumerator().Reset());
         }
-#endif
+
 
         private static IEnumerator<int> MyEnumerator()
         {

+ 0 - 10
Ix.NET/Source/Tests/project.json

@@ -37,11 +37,6 @@
   "frameworks": {
     "netcoreapp1.0": {
       "imports": [ "dotnet", "dnxcore50", "portable-net45+win8" ],
-      "buildOptions": {
-        "define": [
-          "HAS_AWAIT"
-        ]
-      },
       "dependencies": {
         "Microsoft.NETCore.App": {
             "version": "1.0.0",
@@ -50,11 +45,6 @@
       }
     },
     "net461": {
-      "buildOptions": {
-        "define": [
-          "HAS_AWAIT"
-        ]
-      }
     }
   }
 }