ExcludeSchemes

This commit is contained in:
2023-07-19 08:59:36 -07:00
parent 40b12d17f9
commit 2b6e65b730
3 changed files with 68 additions and 12 deletions

View File

@ -9,7 +9,8 @@ public class AppSettings
public string? Company { get; set; }
public string? DefaultNoteType { get; set; }
public string[]? Exclude { get; set; }
public string[]? ExcludeDirectoryNames { get; set; }
public string[]? ExcludeSchemes { get; set; }
public string? WorkingDirectoryName { get; set; }
public override string ToString()
@ -25,14 +26,17 @@ public class AppSettings
throw new NullReferenceException(nameof(appSettings.Company));
if (appSettings?.DefaultNoteType is null)
throw new NullReferenceException(nameof(appSettings.DefaultNoteType));
if (appSettings?.Exclude is null)
throw new NullReferenceException(nameof(appSettings.Exclude));
if (appSettings?.ExcludeDirectoryNames is null)
throw new NullReferenceException(nameof(appSettings.ExcludeDirectoryNames));
if (appSettings?.ExcludeSchemes is null)
throw new NullReferenceException(nameof(appSettings.ExcludeSchemes));
if (appSettings?.WorkingDirectoryName is null)
throw new NullReferenceException(nameof(appSettings.WorkingDirectoryName));
result = new(
appSettings.Company,
appSettings.DefaultNoteType,
appSettings.Exclude,
appSettings.ExcludeDirectoryNames,
appSettings.ExcludeSchemes,
appSettings.WorkingDirectoryName
);
return result;