Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: Removed unnecessary file.Dispose() after loading with using. Oops.
Browse files Browse the repository at this point in the history
  • Loading branch information
RiotNOR committed May 16, 2023
1 parent 54b902c commit 9f57e24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
3 changes: 1 addition & 2 deletions RotationSolver/Helpers/RotationLoadContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ internal Assembly LoadFromFile(string filePath)
using var pdbFile = File.Open(pdbPath, FileMode.Open, FileAccess.Read, FileShare.Read);
var assembly = LoadFromStream(file, pdbFile);

file.Dispose();
pdbFile.Dispose();
return assembly;
}

}
}
21 changes: 8 additions & 13 deletions RotationSolver/Updaters/RotationUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,6 @@ private static async Task DownloadRotationsAsync(string relayFolder, bool mustDo
if (hasDownload) LoadRotationsFromLocal(relayFolder);
}

private static void PrintLoadedAssemblies(IEnumerable<string> assemblies)
{
foreach (var assembly in assemblies)
{
Service.ChatGui.Print("Loaded: " + assembly);
}
}

//private static async Task DownloadRotationsAsync(string relayFolder, bool mustDownload)
//{

//}

private static async Task<bool> DownloadOneUrlAsync(string url, string relayFolder, HttpClient client, bool mustDownload)
{
try
Expand Down Expand Up @@ -211,6 +198,14 @@ private static async Task<bool> DownloadOneUrlAsync(string url, string relayFold
return false;
}

private static void PrintLoadedAssemblies(IEnumerable<string> assemblies)
{
foreach (var assembly in assemblies)
{
Service.ChatGui.Print("Loaded: " + assembly);
}
}

private static Assembly LoadOne(string filePath)
{
try
Expand Down

0 comments on commit 9f57e24

Please sign in to comment.