Exif Helper
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user