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
2 changes: 1 addition & 1 deletion SysManager/SysManager.Tests/EventLogServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void BuildXPath_WithSeverity_IncludesLevel()
{
var opt = new EventLogQueryOptions
{
Severities = new List<EventSeverity> { EventSeverity.Error }
Severities = [EventSeverity.Error]
};
var result = InvokeBuildXPath(opt);
Assert.Contains("Level=2", result);
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Helpers/EqualityConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed class EqualityConverter : IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value == null || parameter == null)
if (value is null || parameter is null)
return false;
return string.Equals(value.ToString(), parameter.ToString(), StringComparison.Ordinal);
}
Expand Down
6 changes: 3 additions & 3 deletions SysManager/SysManager/Models/TargetPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public static class TargetPresets
("FACEIT UK", "82.145.38.1"),
});

public static readonly IReadOnlyList<TargetPreset> All = new[]
{
public static readonly IReadOnlyList<TargetPreset> All =
[
Global, CS2Europe, FaceitEurope, PubgEurope, Streaming
};
];
}
6 changes: 3 additions & 3 deletions SysManager/SysManager/Services/AppAlertService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ public void Stop()
public static IReadOnlyList<AppInstallEntry> GetRegistryApps()
{
List<AppInstallEntry> apps = [];
var paths = new[]
{
string[] paths =
[
@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",
@"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
};
];

foreach (var path in paths)
{
Expand Down
6 changes: 3 additions & 3 deletions SysManager/SysManager/Services/DeepCleanupService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ private static IReadOnlyList<CleanupCategory> Scan(IProgress<ScanProgress>? prog

private static string[] SteamRoots(string pfx86, string pf)
{
var roots = new List<string>
{
List<string> roots =
[
Path.Combine(pfx86, "Steam"),
Path.Combine(pf, "Steam"),
};
];
foreach (var drive in DriveInfo.GetDrives().Where(d => d.DriveType == DriveType.Fixed && d.IsReady))
{
var candidate = Path.Combine(drive.RootDirectory.FullName, "Steam");
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/DuplicateFileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private static IReadOnlyList<DuplicateFileGroup> Scan(
return [];

// ── Pass 1: discover files and group by size ──
var sizeGroups = new Dictionary<long, List<FileInfo>>();
Dictionary<long, List<FileInfo>> sizeGroups = [];
long discovered = 0;
var stack = new Stack<string>();
stack.Push(rootPath);
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/FileShredderService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public async Task ShredFolderAsync(string folderPath, ShredMethod method, IProgr
private static List<string> EnumerateFilesSafe(string rootPath)
{
List<string> results = [];
var stack = new Stack<DirectoryInfo>();
Stack<DirectoryInfo> stack = [];
stack.Push(new DirectoryInfo(rootPath));

while (stack.Count > 0)
Expand Down
Loading