Init
This commit is contained in:
56
Property-Compare/Models/PropertyCompare.cs
Normal file
56
Property-Compare/Models/PropertyCompare.cs
Normal file
@ -0,0 +1,56 @@
|
||||
using System.Text.Json;
|
||||
using View_by_Distance.Property.Models;
|
||||
|
||||
namespace View_by_Distance.PropertyCompare.Models;
|
||||
|
||||
public partial class PropertyCompare
|
||||
{
|
||||
|
||||
protected string _Extension;
|
||||
protected string _FileNameWithoutExtension;
|
||||
protected readonly bool _IsArg;
|
||||
protected DateTime _MinimumDateTime;
|
||||
protected readonly List<long> _Numbers;
|
||||
protected A_Property? _Property;
|
||||
protected string _RegexResult;
|
||||
protected string _RelativeDirectory;
|
||||
protected readonly List<string> _Strings;
|
||||
|
||||
public string Extension => _Extension;
|
||||
public string FileNameWithoutExtension => _FileNameWithoutExtension;
|
||||
public bool IsArg => _IsArg;
|
||||
public DateTime MinimumDateTime => _MinimumDateTime;
|
||||
public List<long> Numbers => _Numbers;
|
||||
public A_Property? Property => _Property;
|
||||
public string RegexResult => _RegexResult;
|
||||
public string RelativeDirectory => _RelativeDirectory;
|
||||
public List<string> Strings => _Strings;
|
||||
|
||||
public PropertyCompare(string extension, string fileNameWithoutExtension, bool isArg, DateTime minimumDateTime, List<long> numbers, A_Property property, string regexResult, string relativeDirectory, List<string> strings)
|
||||
{
|
||||
_IsArg = isArg;
|
||||
_Numbers = numbers;
|
||||
_Strings = strings;
|
||||
_Property = property;
|
||||
_Extension = extension;
|
||||
_RegexResult = regexResult;
|
||||
_MinimumDateTime = minimumDateTime;
|
||||
_RelativeDirectory = relativeDirectory;
|
||||
_FileNameWithoutExtension = fileNameWithoutExtension;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||||
return result;
|
||||
}
|
||||
|
||||
// internal static string GetSelect(PropertyCompare item) => string.Concat(item.JsonFileNameWithoutExtension, item.ImageFileName, '\t', item.Property.CreationTime.Ticks, '\t', GetDateTime(item.Property).ToString("yyyy-MM-dd_HH-mm-ss"), '\t', item.Property.Id, '\t', item.Property.FileSize, '\t', item.Property.Width, '\t', item.Property.Height);
|
||||
|
||||
#nullable disable
|
||||
|
||||
public string GetSelect() => string.Concat(_RelativeDirectory, _FileNameWithoutExtension, _Extension, '\t', _Property.CreationTime.Ticks, '\t', View_by_Distance.Property.Models.Stateless.A_Property.GetDateTime(_Property).ToString("yyyy-MM-dd_HH-mm-ss"), '\t', _Property.Id, '\t', _Property.FileSize, '\t', _Property.Width, '\t', _Property.Height);
|
||||
|
||||
#nullable restore
|
||||
|
||||
}
|
Reference in New Issue
Block a user