Skip to content

Commit 8172a23

Browse files
authored
Merge pull request #1325 from dotnet/dev/bartde/address_some_warnings
Address a few warnings.
2 parents b2d4902 + aa68d6f commit 8172a23

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Rx.NET/Source/src/Microsoft.Reactive.Testing/ReactiveAssert.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ private static string Message<T>(IEnumerable<T> actual, IEnumerable<T> expected)
2424
sb.AppendLine();
2525
sb.Append("Expected: [");
2626
sb.Append(string.Join(", ", expected.Select(x => x.ToString()).ToArray()));
27-
sb.Append("]");
27+
sb.Append(']');
2828
sb.AppendLine();
2929
sb.Append("Actual..: [");
3030
sb.Append(string.Join(", ", actual.Select(x => x.ToString()).ToArray()));
31-
sb.Append("]");
31+
sb.Append(']');
3232
sb.AppendLine();
3333
return sb.ToString();
3434
}

Rx.NET/Source/src/System.Reactive/Concurrency/EventLoopScheduler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private void Run()
355355
{
356356
item.Invoke();
357357
}
358-
catch (ObjectDisposedException ex) when (nameof(EventLoopScheduler).Equals(ex.ObjectName))
358+
catch (ObjectDisposedException ex) when (ex.ObjectName == nameof(EventLoopScheduler))
359359
{
360360
// Since we are not inside the lock at this point
361361
// the scheduler can be disposed before the item had a chance to run

Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Creation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public virtual IObservable<TResult> Repeat<TResult>(TResult value, IScheduler sc
384384
return Repeat_(value, scheduler);
385385
}
386386

387-
private IObservable<TResult> Repeat_<TResult>(TResult value, IScheduler scheduler)
387+
private static IObservable<TResult> Repeat_<TResult>(TResult value, IScheduler scheduler)
388388
{
389389
var longRunning = scheduler.AsLongRunning();
390390
if (longRunning != null)
@@ -404,7 +404,7 @@ public virtual IObservable<TResult> Repeat<TResult>(TResult value, int repeatCou
404404
return Repeat_(value, repeatCount, scheduler);
405405
}
406406

407-
private IObservable<TResult> Repeat_<TResult>(TResult value, int repeatCount, IScheduler scheduler)
407+
private static IObservable<TResult> Repeat_<TResult>(TResult value, int repeatCount, IScheduler scheduler)
408408
{
409409
var longRunning = scheduler.AsLongRunning();
410410
if (longRunning != null)

Rx.NET/Source/src/System.Reactive/Platforms/UWP/Concurrency/CoreDispatcherScheduler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private DispatcherQueue CreateDispatcherQueue()
156156
}
157157

158158
/// <summary>
159-
/// Schedules an action to be executed after <paramref name="dueTime"/> on the dispatcher, using a <see cref="DispatcherTimer"/> object.
159+
/// Schedules an action to be executed after <paramref name="dueTime"/> on the dispatcher, using a <see cref="DispatcherQueueTimer"/> object.
160160
/// </summary>
161161
/// <typeparam name="TState">The type of the state passed to the scheduled action.</typeparam>
162162
/// <param name="state">State passed to the action to be executed.</param>
@@ -221,7 +221,7 @@ private IDisposable ScheduleSlow<TState>(TState state, TimeSpan dueTime, Func<IS
221221
}
222222

223223
/// <summary>
224-
/// Schedules a periodic piece of work on the dispatcher, using a <see cref="DispatcherTimer"/> object.
224+
/// Schedules a periodic piece of work on the dispatcher, using a <see cref="DispatcherQueueTimer"/> object.
225225
/// </summary>
226226
/// <typeparam name="TState">The type of the state passed to the scheduled action.</typeparam>
227227
/// <param name="state">Initial state passed to the action upon the first iteration.</param>

Rx.NET/Source/src/System.Reactive/Subjects/AsyncSubject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ internal bool IsDisposed()
322322

323323
#region IDisposable implementation
324324

325-
private void ThrowDisposed()
325+
private static void ThrowDisposed()
326326
{
327327
throw new ObjectDisposedException(string.Empty);
328328
}

0 commit comments

Comments
 (0)