فهرست منبع

Removing check for absence of Stopwatch.

Bart De Smet 8 سال پیش
والد
کامیت
bc77800155

+ 0 - 4
Rx.NET/Source/src/System.Reactive/Concurrency/ConcurrencyAbstractionLayerImpl.Windows.cs

@@ -74,11 +74,7 @@ namespace System.Reactive.Concurrency
 
         public IStopwatch StartStopwatch()
         {
-#if !NO_STOPWATCH
             return new StopwatchImpl();
-#else
-            return new DefaultStopwatch();
-#endif
         }
 
         public bool SupportsLongRunning

+ 0 - 4
Rx.NET/Source/src/System.Reactive/Concurrency/ConcurrencyAbstractionLayerImpl.cs

@@ -61,11 +61,7 @@ namespace System.Reactive.Concurrency
 
         public IStopwatch StartStopwatch()
         {
-#if !NO_STOPWATCH
             return new StopwatchImpl();
-#else
-            return new DefaultStopwatch();
-#endif
         }
 
         public bool SupportsLongRunning

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Concurrency/EventLoopScheduler.cs

@@ -231,7 +231,6 @@ namespace System.Reactive.Concurrency
             return StableCompositeDisposable.Create(d, gate);
         }
 
-#if !NO_STOPWATCH
         /// <summary>
         /// Starts a new stopwatch object.
         /// </summary>
@@ -245,7 +244,6 @@ namespace System.Reactive.Concurrency
             //
             return new StopwatchImpl();
         }
-#endif
 
         /// <summary>
         /// Ends the thread associated with this scheduler. All remaining work in the scheduler queue is abandoned.

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Concurrency/NewThreadScheduler.cs

@@ -177,7 +177,6 @@ namespace System.Reactive.Concurrency
             }
         }
 
-#if !NO_STOPWATCH
         /// <summary>
         /// Starts a new stopwatch object.
         /// </summary>
@@ -191,6 +190,5 @@ namespace System.Reactive.Concurrency
             //
             return new StopwatchImpl();
         }
-#endif
     }
 }

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Concurrency/TaskPoolScheduler.cs

@@ -150,7 +150,6 @@ namespace System.Reactive.Concurrency
             return d;
         }
 
-#if !NO_STOPWATCH
         /// <summary>
         /// Gets a new stopwatch ob ject.
         /// </summary>
@@ -164,7 +163,6 @@ namespace System.Reactive.Concurrency
             //
             return new StopwatchImpl();
         }
-#endif
 
         /// <summary>
         /// Schedules a periodic piece of work by running a platform-specific timer to create tasks periodically.

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Concurrency/ThreadPoolScheduler.cs

@@ -94,7 +94,6 @@ namespace System.Reactive.Concurrency
             return s_newBackgroundThread.Value.ScheduleLongRunning(state, action);
         }
 
-#if !NO_STOPWATCH
         /// <summary>
         /// Starts a new stopwatch object.
         /// </summary>
@@ -108,7 +107,6 @@ namespace System.Reactive.Concurrency
             //
             return new StopwatchImpl();
         }
-#endif
 
         /// <summary>
         /// Schedules a periodic piece of work, using a System.Threading.Timer object.

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Internal/StopwatchImpl.cs

@@ -2,7 +2,6 @@
 // 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 !NO_STOPWATCH
 using System.Diagnostics;
 
 namespace System.Reactive.Concurrency
@@ -27,4 +26,3 @@ namespace System.Reactive.Concurrency
         }
     }
 }
-#endif

+ 0 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/EventLoopSchedulerTest.cs

@@ -273,14 +273,12 @@ namespace ReactiveTests.Tests
 #endif
 
 #if !NO_PERF
-#if !NO_STOPWATCH
         [Fact]
         public void Stopwatch()
         {
             StopwatchTest.Run(new EventLoopScheduler());
         }
 #endif
-#endif
 
 #if !NO_CDS
         [Fact]

+ 0 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/NewThreadSchedulerTest.cs

@@ -61,13 +61,11 @@ namespace ReactiveTests.Tests
 #endif
 
 #if !NO_PERF
-#if !NO_STOPWATCH
         [Fact]
         public void Stopwatch()
         {
             StopwatchTest.Run(NewThreadScheduler.Default);
         }
-#endif
 #endif
 
         [Fact]

+ 0 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/StopwatchTest.cs

@@ -2,7 +2,6 @@
 // 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 !NO_STOPWATCH
 using System;
 using System.Reactive.Concurrency;
 using System.Threading;
@@ -40,4 +39,3 @@ namespace ReactiveTests.Tests
         }
     }
 }
-#endif

+ 0 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/TaskPoolSchedulerTest.cs

@@ -109,13 +109,11 @@ namespace ReactiveTests.Tests
 #endif
 
 #if !NO_PERF
-#if !NO_STOPWATCH
         [Fact]
         public void Stopwatch()
         {
             StopwatchTest.Run(TaskPoolScheduler.Default);
         }
-#endif
 #endif
 
         [Fact]

+ 0 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/ThreadPoolSchedulerTest.cs

@@ -189,8 +189,6 @@ namespace ReactiveTests.Tests
             Assert.True(n >= 10);
         }
 
-#if !NO_STOPWATCH
-
         [Fact]
         public void Stopwatch()
         {
@@ -205,8 +203,6 @@ namespace ReactiveTests.Tests
             Assert.True(s1 > s0);
         }
 
-#endif
-
         [Fact]
         public void Periodic_ArgumentChecking()
         {

+ 1 - 1
Rx.NET/Source/tests/Tests.System.Reactive/Tests/DefaultConcurrencyAbstractionLayerTest.cs

@@ -310,7 +310,7 @@ namespace ReactiveTests.Tests
         }
 #endif
 
-#if !NO_PERF && !NO_STOPWATCH
+#if !NO_PERF
         [Fact]
         public void Stopwatch()
         {