ResultAllInOneSubdirectoryLength
This commit is contained in:
@ -9,20 +9,17 @@ public class AppSettings
|
||||
public string Company { init; get; }
|
||||
public string CopyTo { init; get; }
|
||||
public int MaxDegreeOfParallelism { init; get; }
|
||||
public int MaxValue { init; get; }
|
||||
public string WorkingDirectoryName { init; get; }
|
||||
|
||||
[JsonConstructor]
|
||||
public AppSettings(string company,
|
||||
string copyTo,
|
||||
int maxDegreeOfParallelism,
|
||||
int maxValue,
|
||||
string workingDirectoryName)
|
||||
{
|
||||
Company = company;
|
||||
CopyTo = copyTo;
|
||||
MaxDegreeOfParallelism = maxDegreeOfParallelism;
|
||||
MaxValue = maxValue;
|
||||
WorkingDirectoryName = workingDirectoryName;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@ public class AppSettings
|
||||
|
||||
public string Company { get; set; }
|
||||
public int? MaxDegreeOfParallelism { get; set; }
|
||||
public int? MaxValue { get; set; }
|
||||
public string CopyTo { get; set; }
|
||||
public string WorkingDirectoryName { get; set; }
|
||||
|
||||
@ -27,13 +26,10 @@ public class AppSettings
|
||||
Models.AppSettings result;
|
||||
if (appSettings?.MaxDegreeOfParallelism is null)
|
||||
throw new NullReferenceException(nameof(appSettings.MaxDegreeOfParallelism));
|
||||
if (appSettings?.MaxValue is null)
|
||||
throw new NullReferenceException(nameof(appSettings.MaxValue));
|
||||
result = new(
|
||||
appSettings.Company,
|
||||
appSettings.CopyTo,
|
||||
appSettings.MaxDegreeOfParallelism.Value,
|
||||
appSettings.MaxValue.Value,
|
||||
appSettings.WorkingDirectoryName
|
||||
);
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user