mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-15 22:14:15 +01:00
more performance improvements
This commit is contained in:
parent
a32209c2e1
commit
9ac8e929f8
3 changed files with 112 additions and 81 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#nullable disable
|
||||
|
||||
|
||||
using System;
|
||||
|
||||
namespace MareSynchronos.FileCacheDB
|
||||
{
|
||||
|
||||
|
|
@ -9,9 +11,19 @@ namespace MareSynchronos.FileCacheDB
|
|||
private FileCacheEntity entity;
|
||||
public string Filepath { get; private set; }
|
||||
public string Hash { get; private set; }
|
||||
public string OriginalFilepath => entity.Filepath;
|
||||
public string OriginalHash => entity.Hash;
|
||||
public long LastModifiedDateTicks => long.Parse(entity.LastModifiedDate);
|
||||
private string originalFilePathNoEntity = string.Empty;
|
||||
private string originalHashNoEntity = string.Empty;
|
||||
private string originalModifiedDate = string.Empty;
|
||||
public string OriginalFilepath => entity == null ? originalFilePathNoEntity : entity.Filepath;
|
||||
public string OriginalHash => entity == null ? originalHashNoEntity : entity.Hash;
|
||||
public long LastModifiedDateTicks => long.Parse(entity == null ? originalModifiedDate : entity.LastModifiedDate);
|
||||
|
||||
public FileCache(string hash, string path, string lastModifiedDate)
|
||||
{
|
||||
originalHashNoEntity = hash;
|
||||
originalFilePathNoEntity = path;
|
||||
originalModifiedDate = lastModifiedDate;
|
||||
}
|
||||
|
||||
public FileCache(FileCacheEntity entity)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue