소스 검색

Removing some more dead code.

Bart De Smet 8 년 전
부모
커밋
41b86f838e
2개의 변경된 파일0개의 추가작업 그리고 24개의 파일을 삭제
  1. 0 12
      Ix.NET/Source/System.Interactive.Async/AsyncIterator.cs
  2. 0 12
      Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs

+ 0 - 12
Ix.NET/Source/System.Interactive.Async/AsyncIterator.cs

@@ -12,7 +12,6 @@ namespace System.Linq
     {
         private readonly int threadId;
 
-        private CancellationTokenSource cancellationTokenSource;
         private bool currentIsInvalid = true;
 
         internal TSource current;
@@ -30,7 +29,6 @@ namespace System.Linq
                 : Clone();
 
             enumerator.state = AsyncIteratorState.Allocated;
-            enumerator.cancellationTokenSource = new CancellationTokenSource();
 
             try
             {
@@ -47,16 +45,6 @@ namespace System.Linq
 
         public virtual Task DisposeAsync()
         {
-            if (cancellationTokenSource != null)
-            {
-                if (!cancellationTokenSource.IsCancellationRequested)
-                {
-                    cancellationTokenSource.Cancel();
-                }
-
-                cancellationTokenSource.Dispose();
-            }
-
             current = default(TSource);
             state = AsyncIteratorState.Disposed;
 

+ 0 - 12
Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs

@@ -12,7 +12,6 @@ namespace System.Linq
     {
         private readonly int threadId;
 
-        private CancellationTokenSource cancellationTokenSource;
         private bool currentIsInvalid = true;
 
         internal TSource current;
@@ -30,7 +29,6 @@ namespace System.Linq
                 : Clone();
 
             enumerator.state = AsyncIteratorState.Allocated;
-            enumerator.cancellationTokenSource = new CancellationTokenSource();
 
             try
             {
@@ -47,16 +45,6 @@ namespace System.Linq
 
         public virtual Task DisposeAsync()
         {
-            if (cancellationTokenSource != null)
-            {
-                if (!cancellationTokenSource.IsCancellationRequested)
-                {
-                    cancellationTokenSource.Cancel();
-                }
-
-                cancellationTokenSource.Dispose();
-            }
-
             current = default(TSource);
             state = AsyncIteratorState.Disposed;