mirror of
https://github.com/kwsch/NHSE.git
synced 2026-03-28 20:44:33 -05:00
22 lines
662 B
C#
22 lines
662 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace NHSE.Core
|
|
{
|
|
#pragma warning disable CA2237 // Mark ISerializable types with serializable
|
|
public sealed class FileHashInfo : Dictionary<uint, FileHashDetails>
|
|
#pragma warning restore CA2237 // Mark ISerializable types with serializable
|
|
{
|
|
public FileHashInfo(IEnumerable<FileHashDetails> hashSets)
|
|
{
|
|
foreach (var hashSet in hashSets)
|
|
this[hashSet.FileSize] = hashSet;
|
|
}
|
|
|
|
public FileHashDetails? GetFile(string nameData)
|
|
{
|
|
return this.FirstOrDefault(z => z.Value.FileName == nameData).Value;
|
|
}
|
|
}
|
|
}
|