Refactors code to reduce technical debt
@@ -231,10 +231,7 @@ namespace System.Reactive.Concurrency
throw new InvalidOperationException(); // REVIEW: No support for blocking.
}
- if (_error != null)
- {
- _error.Throw();
- }
+ _error?.Throw();
public void OnCompleted(Action continuation)
@@ -191,10 +191,7 @@ namespace System.Linq
finally
{
- if (_buffer != null)
- _buffer.Done(i + 1);
+ _buffer?.Done(i + 1);
@@ -291,10 +291,7 @@ namespace System.Linq
- if (list != null)
- list.Add(expression);
+ list?.Add(expression);
//
@@ -47,10 +47,7 @@ namespace System.Linq
d1.Dispose();
var d2 = Interlocked.Exchange(ref _d2, null);
- if (d2 != null)
- d2.Dispose();
+ d2?.Dispose();