2023-09-15 22:34:47 -04:00
|
|
|
using SabreTools.Serialization.Interfaces;
|
|
|
|
|
|
2023-09-09 00:02:56 -04:00
|
|
|
namespace SabreTools.Serialization.Files
|
|
|
|
|
{
|
|
|
|
|
public partial class Hashfile : IFileSerializer<Models.Hashfile.Hashfile>
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc/>
|
2023-09-11 01:23:29 -04:00
|
|
|
public Models.Hashfile.Hashfile? Deserialize(string? path) => Deserialize(path, Hash.CRC);
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
public Models.Hashfile.Hashfile? Deserialize(string? path, Hash hash)
|
2023-09-09 00:02:56 -04:00
|
|
|
{
|
|
|
|
|
using (var stream = PathProcessor.OpenStream(path))
|
|
|
|
|
{
|
2023-09-11 01:23:29 -04:00
|
|
|
return new Streams.Hashfile().Deserialize(stream, hash);
|
2023-09-09 00:02:56 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|