Exif Helper

This commit is contained in:
2024-10-20 18:56:57 -07:00
parent 19326df4c6
commit 80ca8f98eb
29 changed files with 1287 additions and 10 deletions

View File

@ -13,6 +13,7 @@ public class AppSettings
public string[]? ExcludeSchemes { get; set; }
public string? PersonBirthdayFormat { get; set; }
public string? PersonTitleFilters { get; set; }
public string[]? ValidImageFormatExtensions { get; set; }
public string? WorkingDirectoryName { get; set; }
public override string ToString()
@ -47,20 +48,20 @@ public class AppSettings
if (appSettings?.ExcludeSchemes is null) throw new NullReferenceException(nameof(appSettings.ExcludeSchemes));
if (appSettings?.PersonBirthdayFormat is null) throw new NullReferenceException(nameof(appSettings.PersonBirthdayFormat));
if (appSettings?.PersonTitleFilters is null) throw new NullReferenceException(nameof(appSettings.PersonTitleFilters));
if (appSettings?.ValidImageFormatExtensions is null) throw new NullReferenceException(nameof(appSettings.ValidImageFormatExtensions));
if (appSettings?.WorkingDirectoryName is null) throw new NullReferenceException(nameof(appSettings.WorkingDirectoryName));
result = new(
appSettings.Company,
appSettings.DefaultNoteType,
appSettings.ExcludeDirectoryNames,
appSettings.ExcludeSchemes,
appSettings.PersonBirthdayFormat,
appSettings.PersonTitleFilters.ToArray(),
appSettings.WorkingDirectoryName
);
result = new(appSettings.Company,
appSettings.DefaultNoteType,
appSettings.ExcludeDirectoryNames,
appSettings.ExcludeSchemes,
appSettings.PersonBirthdayFormat,
appSettings.PersonTitleFilters.ToArray(),
appSettings.ValidImageFormatExtensions,
appSettings.WorkingDirectoryName);
return result;
}
internal static Models.AppSettings Get(IConfigurationRoot configurationRoot)
public static Models.AppSettings Get(IConfigurationRoot configurationRoot)
{
Models.AppSettings result;
#pragma warning disable IL3050, IL2026