Updated ICommandAction.cs and DBEvent.cs. Removed thread request from DBEvent and added special thread request to ICommandAction.cs

This commit is contained in:
2024-07-22 19:20:17 +03:00
parent 08c5febd66
commit 8c338820c5
42 changed files with 691 additions and 26 deletions

View File

@@ -30,10 +30,10 @@ public static class ArchiveManager
/// <param name="fileName">The file name in the archive</param>
/// <param name="archName">The archive location on the disk</param>
/// <returns>An array of bytes that represents the Stream value from the file that was read inside the archive</returns>
public static async Task<byte[]?> ReadStreamFromPakAsync(string fileName, string archName)
public static async Task<byte[]?> ReadAllBytes(string fileName, string archName)
{
archName = Application.CurrentApplication.ApplicationEnvironmentVariables["ArchiveFolder"] + archName;
archName = Path.Combine(Application.CurrentApplication.ApplicationEnvironmentVariables["ArchiveFolder"], archName);
if (!File.Exists(archName))
throw new Exception("Failed to load file !");
@@ -49,6 +49,9 @@ public static class ArchiveManager
stream.Close();
memoryStream.Close();
Console.WriteLine("Read file from archive: " + fileName);
Console.WriteLine("Size: " + data.Length);
return data;
}