Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ private void Cancel()
if (w != null)
w.Dispose();

var c = _continuation;
if (c != null)
c();
_continuation?.Invoke();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ public bool IsDisposed
/// </summary>
public void Dispose()
{
var dispose = Interlocked.Exchange(ref _dispose, null);
if (dispose != null)
{
dispose();
}
Interlocked.Exchange(ref _dispose, null)?.Invoke();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,12 @@ public static void Release()

private static void OnSuspending(object sender, HostSuspendingEventArgs e)
{
var suspending = Suspending;
if (suspending != null)
suspending(sender, e);
Suspending?.Invoke(sender, e);
}

private static void OnResuming(object sender, HostResumingEventArgs e)
{
var resuming = Resuming;
if (resuming != null)
resuming(sender, e);
Resuming?.Invoke(sender, e);
}

private static IHostLifecycleNotifications InitializeNotifications()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ private void TimeChanged()
var diff = now - (_lastTime + _period);
if (Math.Abs(diff.TotalMilliseconds) >= MAXERROR)
{
var scc = _systemClockChanged;
if (scc != null)
scc(this, new SystemClockChangedEventArgs(_lastTime + _period, now));
_systemClockChanged?.Invoke(this, new SystemClockChangedEventArgs(_lastTime + _period, now));

NewTimer();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ public AsyncInfoToObservableBridge(IAsyncInfo info, Action<IAsyncInfo, Action<IA

_subject = new AsyncSubject<TResult>();

if (onProgress != null)
onProgress?.Invoke(info, (iai, p) =>
{
onProgress(info, (iai, p) =>
{
if (multiValue && getResult != null)
_subject.OnNext(getResult(iai));
if (multiValue && getResult != null)
_subject.OnNext(getResult(iai));

if (progress != null)
progress.Report(p);
});
}
if (progress != null)
progress.Report(p);
});

Done(info, info.Status, true);
}
Expand Down