mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 15:44:00 +08:00
(Dump): convenient class for tracing/debugging.
This commit is contained in:
parent
a9375e777e
commit
dd3d87aff7
@ -401,4 +401,16 @@ namespace GameRes.Formats
|
||||
System.GC.SuppressFinalize (this);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Dump
|
||||
{
|
||||
public static string DirectoryName = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
|
||||
|
||||
[System.Diagnostics.Conditional("DEBUG")]
|
||||
public static void Write (byte[] mem, string filename = "index.dat")
|
||||
{
|
||||
using (var dump = File.Create (Path.Combine (DirectoryName, filename)))
|
||||
dump.Write (mem, 0, mem.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user