Genealogical Data Communication but
I still am dependant on directory
This commit is contained in:
@ -7,6 +7,8 @@ public record AppSettings(string Company,
|
||||
string DefaultNoteType,
|
||||
string[] ExcludeDirectoryNames,
|
||||
string[] ExcludeSchemes,
|
||||
string PersonBirthdayFormat,
|
||||
char[] PersonCharacters,
|
||||
string WorkingDirectoryName)
|
||||
{
|
||||
|
||||
|
@ -11,6 +11,8 @@ public class AppSettings
|
||||
public string? DefaultNoteType { get; set; }
|
||||
public string[]? ExcludeDirectoryNames { get; set; }
|
||||
public string[]? ExcludeSchemes { get; set; }
|
||||
public string? PersonBirthdayFormat { get; set; }
|
||||
public string? PersonCharacters { get; set; }
|
||||
public string? WorkingDirectoryName { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
@ -30,6 +32,10 @@ public class AppSettings
|
||||
throw new NullReferenceException(nameof(appSettings.ExcludeDirectoryNames));
|
||||
if (appSettings?.ExcludeSchemes is null)
|
||||
throw new NullReferenceException(nameof(appSettings.ExcludeSchemes));
|
||||
if (appSettings?.PersonBirthdayFormat is null)
|
||||
throw new NullReferenceException(nameof(appSettings.PersonBirthdayFormat));
|
||||
if (appSettings?.PersonCharacters is null)
|
||||
throw new NullReferenceException(nameof(appSettings.PersonCharacters));
|
||||
if (appSettings?.WorkingDirectoryName is null)
|
||||
throw new NullReferenceException(nameof(appSettings.WorkingDirectoryName));
|
||||
result = new(
|
||||
@ -37,6 +43,8 @@ public class AppSettings
|
||||
appSettings.DefaultNoteType,
|
||||
appSettings.ExcludeDirectoryNames,
|
||||
appSettings.ExcludeSchemes,
|
||||
appSettings.PersonBirthdayFormat,
|
||||
appSettings.PersonCharacters.ToArray(),
|
||||
appSettings.WorkingDirectoryName
|
||||
);
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user