1
0
Fork 0
mirror of https://github.com/wagesj45/mdfinder.git synced 2025-09-09 03:20:38 -05:00

Ugly Safety Checkin

Everything works. Mostly. It is kinda of flimsy so it needs to be cleaned up.
This commit is contained in:
Jordan Wages 2019-02-28 01:17:38 -06:00
commit 1de70724b0
17 changed files with 885 additions and 145 deletions

View file

@ -63,8 +63,15 @@ namespace mdfinder
/// <param name="hashProvider"> The hash provider. </param>
public void InsertFileRecord(string path, long size, string hash, string hashProvider)
{
var fileRecord = new FileRecord() { Path = new Uri(path), Size = size, Hash = hash, HashProvider = hashProvider };
this.FileRecordCollection.Insert(fileRecord);
var fileRecord = new FileRecord(path, size, hash, hashProvider);
this.FileRecordCollection.Upsert(fileRecord);
}
/// <summary> Removes the file record described by ID. </summary>
/// <param name="id"> The identifier. </param>
public void RemoveFileRecord(string path)
{
this.FileRecordCollection.Delete(fr => fr.Id == path);
}
/// <summary> Gets the file records in this collection. </summary>