|
|
@@ -2,8 +2,6 @@
|
|
|
// The .NET Foundation licenses this file to you under the MIT License.
|
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
|
|
-#nullable disable
|
|
|
-
|
|
|
using System.Reactive.Concurrency;
|
|
|
using System.Reactive.Disposables;
|
|
|
|
|
|
@@ -52,16 +50,16 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
private TState _state;
|
|
|
private bool _first;
|
|
|
|
|
|
- public void Run(IScheduler _scheduler)
|
|
|
+ public void Run(IScheduler scheduler)
|
|
|
{
|
|
|
- var longRunning = _scheduler.AsLongRunning();
|
|
|
+ var longRunning = scheduler.AsLongRunning();
|
|
|
if (longRunning != null)
|
|
|
{
|
|
|
- SetUpstream(longRunning.ScheduleLongRunning(this, (@this, c) => @this.Loop(c)));
|
|
|
+ SetUpstream(longRunning.ScheduleLongRunning(this, static (@this, c) => @this.Loop(c)));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- SetUpstream(_scheduler.Schedule(this, (@this, a) => @this.LoopRec(a)));
|
|
|
+ SetUpstream(scheduler.Schedule(this, static (@this, a) => @this.LoopRec(a)));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -205,7 +203,7 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
{
|
|
|
var timer = new SingleAssignmentDisposable();
|
|
|
Disposable.TrySetMultiple(ref _timerDisposable, timer);
|
|
|
- timer.Disposable = outerScheduler.Schedule((@this: this, initialState), (scheduler, tuple) => [email protected](scheduler, tuple.initialState));
|
|
|
+ timer.Disposable = outerScheduler.Schedule((@this: this, initialState), static (scheduler, tuple) => [email protected](scheduler, tuple.initialState));
|
|
|
}
|
|
|
|
|
|
protected override void Dispose(bool disposing)
|
|
|
@@ -256,7 +254,7 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
|
|
|
var timer = new SingleAssignmentDisposable();
|
|
|
Disposable.TrySetMultiple(ref _timerDisposable, timer);
|
|
|
- timer.Disposable = self.Schedule((@this: this, state), time, (scheduler, tuple) => [email protected](scheduler, tuple.state));
|
|
|
+ timer.Disposable = self.Schedule((@this: this, state), time, static (scheduler, tuple) => [email protected](scheduler, tuple.state));
|
|
|
|
|
|
return Disposable.Empty;
|
|
|
}
|
|
|
@@ -314,7 +312,7 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
{
|
|
|
var timer = new SingleAssignmentDisposable();
|
|
|
Disposable.TrySetMultiple(ref _timerDisposable, timer);
|
|
|
- timer.Disposable = outerScheduler.Schedule((@this: this, initialState), (scheduler, tuple) => [email protected](scheduler, tuple.initialState));
|
|
|
+ timer.Disposable = outerScheduler.Schedule((@this: this, initialState), static (scheduler, tuple) => [email protected](scheduler, tuple.initialState));
|
|
|
}
|
|
|
|
|
|
protected override void Dispose(bool disposing)
|
|
|
@@ -365,7 +363,7 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
|
|
|
var timer = new SingleAssignmentDisposable();
|
|
|
Disposable.TrySetMultiple(ref _timerDisposable, timer);
|
|
|
- timer.Disposable = self.Schedule((@this: this, state), time, (scheduler, tuple) => [email protected](scheduler, tuple.state));
|
|
|
+ timer.Disposable = self.Schedule((@this: this, state), time, static (scheduler, tuple) => [email protected](scheduler, tuple.state));
|
|
|
|
|
|
return Disposable.Empty;
|
|
|
}
|