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 @@ -12,7 +12,7 @@ namespace SysManager.Helpers;
/// An <see cref="ObservableCollection{T}"/> that supports bulk replacement
/// with a single <see cref="NotifyCollectionChangedAction.Reset"/> notification.
/// </summary>
public class BulkObservableCollection<T> : ObservableCollection<T>
public sealed class BulkObservableCollection<T> : ObservableCollection<T>
{
private bool _suppressNotifications;

Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/ActivityLogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public sealed class ActivityLogService
public IReadOnlyList<ActivityEntry> GetRecent(int count = 5)
{
lock (_lock)
return _entries.Take(count).ToList();
return _entries.Take(count).ToArray();
}

public void Log(string action, string detail)
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/DnsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public async Task<IReadOnlyList<string>> CaptureCurrentServersAsync(Cancellation
.Select(r => r?.ToString())
.Where(s => !string.IsNullOrWhiteSpace(s) && IPAddress.TryParse(s, out _))
.Select(s => s!)
.ToList();
.ToArray();
}
finally { _gate.Release(); }
}
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/LargeFileScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private static IReadOnlyList<LargeFileEntry> Scan(
}

progress?.Report(new LargeFileProgress(scanned, bytesScanned, "Done"));
return heap.Reverse().Select(h => meta[h.Path]).ToList();
return heap.Reverse().Select(h => meta[h.Path]).ToArray();
}

private static bool ShouldSkip(string path)
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/PingMonitorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static TimeSpan Clamp(TimeSpan t) =>
foreach (var target in active)
_ = PingOnceAsync(target, ct);

try { await Task.Delay(Clamp(Interval), ct); }
try { await Task.Delay(Clamp(Interval), ct).ConfigureAwait(false); }
catch (OperationCanceledException) { return; }
}
}
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/SpeedTestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private static async Task<double> MeasureDownloadAsync(
}
});

await Task.WhenAll(tasks);
await Task.WhenAll(tasks).ConfigureAwait(false);
sw.Stop();

var downloaded = Interlocked.Read(ref totalBytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private async Task PumpAsync(CancellationToken ct)
catch (InvalidOperationException) { /* traceroute failed for this target — skip */ }
}

try { await Task.Delay(Interval, ct); }
try { await Task.Delay(Interval, ct).ConfigureAwait(false); }
catch (OperationCanceledException) { return; }
}
}
Expand Down
Loading