浏览代码

Moving Never to a separate file.

Bart De Smet 8 年之前
父节点
当前提交
c0220bef20

+ 0 - 6
Ix.NET/Source/System.Interactive.Async/AsyncEnumerableEx.cs → Ix.NET/Source/System.Interactive.Async/System/Linq/AsyncEnumerableEx.cs

@@ -5,17 +5,11 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Threading.Tasks;
-using static System.Linq.AsyncEnumerable;
 
 namespace System.Linq
 {
     public static partial class AsyncEnumerableEx
     {
-        public static IAsyncEnumerable<TValue> Never<TValue>()
-        {
-            return CreateEnumerable(() => CreateEnumerator<TValue>(tcs => tcs.Task, current: null, dispose: null));
-        }
-
         private static IAsyncEnumerator<T> CreateEnumerator<T>(Func<TaskCompletionSource<bool>, Task<bool>> moveNext, Func<T> current, Func<Task> dispose)
         {
             var self = new AnonymousAsyncIterator<T>(

+ 17 - 0
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Never.cs

@@ -0,0 +1,17 @@
+// 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. 
+
+using System.Collections.Generic;
+using static System.Linq.AsyncEnumerable;
+
+namespace System.Linq
+{
+    public static partial class AsyncEnumerableEx
+    {
+        public static IAsyncEnumerable<TValue> Never<TValue>()
+        {
+            return CreateEnumerable(() => CreateEnumerator<TValue>(tcs => tcs.Task, current: null, dispose: null));
+        }
+    }
+}