48 lines
2.5 KiB
C#
48 lines
2.5 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json;
|
|
|
|
namespace View_by_Distance.Property.Models.Binder;
|
|
|
|
public class Configuration
|
|
{
|
|
|
|
[Display(Name = "Date Group"), Required] public string DateGroup { get; set; }
|
|
[Display(Name = "File Name Directory Separator"), Required] public string FileNameDirectorySeparator { get; set; }
|
|
[Display(Name = "Force Property Last Write Time to Creation Time"), Required] public bool? ForcePropertyLastWriteTimeToCreationTime { get; set; }
|
|
[Display(Name = "Ignore Extensions"), Required] public string[] IgnoreExtensions { get; set; }
|
|
[Display(Name = "Max Images In Directory For Top Level First Pass"), Required] public int? MaxImagesInDirectoryForTopLevelFirstPass { get; set; }
|
|
[Display(Name = "Pattern"), Required] public string Pattern { get; set; }
|
|
[Display(Name = "Populate Properties Id"), Required] public bool? PopulatePropertyId { get; set; }
|
|
[Display(Name = "Properties Changed For Property"), Required] public bool? PropertiesChangedForProperty { get; set; }
|
|
[Display(Name = "Property Content Collection Files"), Required] public string[] PropertyContentCollectionFiles { get; set; }
|
|
[Display(Name = "Root Directory"), Required] public string RootDirectory { get; set; }
|
|
[Display(Name = "Valid Image Format Extensions"), Required] public string[] ValidImageFormatExtensions { get; set; }
|
|
[Display(Name = "Valid Metadata Extensions"), Required] public string[] ValidMetadataExtensions { get; set; }
|
|
[Display(Name = "Verify to Season"), Required] public string[] VerifyToSeason { get; set; }
|
|
[Display(Name = "Write Bitmap Data Bytes"), Required] public bool? WriteBitmapDataBytes { get; set; }
|
|
|
|
public Configuration()
|
|
{
|
|
DateGroup = string.Empty;
|
|
FileNameDirectorySeparator = string.Empty;
|
|
ForcePropertyLastWriteTimeToCreationTime = null;
|
|
IgnoreExtensions = Array.Empty<string>();
|
|
MaxImagesInDirectoryForTopLevelFirstPass = null;
|
|
Pattern = string.Empty;
|
|
PopulatePropertyId = null;
|
|
PropertiesChangedForProperty = null;
|
|
PropertyContentCollectionFiles = Array.Empty<string>();
|
|
RootDirectory = string.Empty;
|
|
ValidImageFormatExtensions = Array.Empty<string>();
|
|
ValidMetadataExtensions = Array.Empty<string>();
|
|
VerifyToSeason = Array.Empty<string>();
|
|
WriteBitmapDataBytes = null;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
} |