OriginalFileName

This commit is contained in:
2023-11-11 19:33:20 -07:00
parent 5a511a38e1
commit bf8b1c010e
13 changed files with 300 additions and 261 deletions

View File

@ -8,11 +8,7 @@ public class AppSettings
{
public string? Company { get; set; }
public string? DefaultUnknownDirectoryName { get; set; }
public bool? ForceIdName { get; set; }
public int? MaxDegreeOfParallelism { get; set; }
public int? MaxMinutesDelta { get; set; }
public bool? RenameUndo { get; set; }
public override string ToString()
{
@ -24,19 +20,10 @@ public class AppSettings
{
Models.AppSettings result;
if (appSettings?.Company is null) throw new NullReferenceException(nameof(appSettings.Company));
if (appSettings?.DefaultUnknownDirectoryName is null) throw new NullReferenceException(nameof(appSettings.DefaultUnknownDirectoryName));
if (appSettings?.ForceIdName is null) throw new NullReferenceException(nameof(appSettings.ForceIdName));
if (appSettings?.MaxDegreeOfParallelism is null) throw new NullReferenceException(nameof(appSettings.MaxDegreeOfParallelism));
if (appSettings?.MaxMinutesDelta is null) throw new NullReferenceException(nameof(appSettings.MaxMinutesDelta));
if (appSettings?.RenameUndo is null) throw new NullReferenceException(nameof(appSettings.RenameUndo));
result = new(
appSettings.Company,
appSettings.DefaultUnknownDirectoryName,
appSettings.ForceIdName.Value,
appSettings.MaxDegreeOfParallelism.Value,
appSettings.MaxMinutesDelta.Value,
appSettings.RenameUndo.Value
);
appSettings.MaxDegreeOfParallelism.Value);
return result;
}