mirror of
https://github.com/Stone-Red-Code/HyperbolicDownloader.git
synced 2026-09-04 23:41:07 +02:00
23 lines
512 B
C#
23 lines
512 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace HyperbolicDownloaderApi.FileProcessing;
|
|
|
|
internal class HyperFileDto
|
|
{
|
|
public string Hash { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
|
|
[JsonConstructor]
|
|
public HyperFileDto(string hash, string name)
|
|
{
|
|
Hash = hash;
|
|
Name = name;
|
|
}
|
|
|
|
public HyperFileDto(PrivateHyperFileInfo privateHyperFileInfo)
|
|
{
|
|
Hash = privateHyperFileInfo.Hash;
|
|
Name = Path.GetFileName(privateHyperFileInfo.FilePath);
|
|
}
|
|
} |