Linux Config
This commit is contained in:
@ -8,18 +8,15 @@ public class AppSettings
|
||||
|
||||
public string Company { init; get; }
|
||||
public int MaxDegreeOfParallelism { init; get; }
|
||||
public string SaveDirectory { init; get; }
|
||||
public string WorkingDirectoryName { init; get; }
|
||||
|
||||
[JsonConstructor]
|
||||
public AppSettings(string company,
|
||||
int maxDegreeOfParallelism,
|
||||
string saveDirectory,
|
||||
string workingDirectoryName)
|
||||
{
|
||||
Company = company;
|
||||
MaxDegreeOfParallelism = maxDegreeOfParallelism;
|
||||
SaveDirectory = saveDirectory;
|
||||
WorkingDirectoryName = workingDirectoryName;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@ public class AppSettings
|
||||
|
||||
public string Company { get; set; }
|
||||
public int? MaxDegreeOfParallelism { get; set; }
|
||||
public string SaveDirectory { get; set; }
|
||||
public string WorkingDirectoryName { get; set; }
|
||||
|
||||
#nullable restore
|
||||
@ -29,7 +28,6 @@ public class AppSettings
|
||||
result = new(
|
||||
appSettings.Company,
|
||||
appSettings.MaxDegreeOfParallelism.Value,
|
||||
appSettings.SaveDirectory,
|
||||
appSettings.WorkingDirectoryName
|
||||
);
|
||||
return result;
|
||||
|
@ -13,6 +13,7 @@ public class Configuration
|
||||
[Display(Name = "Ignore Extensions"), Required] public string[] IgnoreExtensions { get; set; }
|
||||
[Display(Name = "Property Configuration"), Required] public Property.Models.Configuration PropertyConfiguration { get; set; }
|
||||
[Display(Name = "Person Birthday Format"), Required] public string PersonBirthdayFormat { get; set; }
|
||||
[Display(Name = "Save Directory"), Required] public string SaveDirectory { get; set; }
|
||||
|
||||
#nullable restore
|
||||
|
||||
@ -34,7 +35,8 @@ public class Configuration
|
||||
result = new(
|
||||
configuration.IgnoreExtensions,
|
||||
configuration.PersonBirthdayFormat,
|
||||
configuration.PropertyConfiguration);
|
||||
configuration.PropertyConfiguration,
|
||||
configuration.SaveDirectory);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ public class Configuration
|
||||
protected Property.Models.Configuration _PropertyConfiguration;
|
||||
public string[] IgnoreExtensions { init; get; }
|
||||
public string PersonBirthdayFormat { init; get; }
|
||||
public string SaveDirectory { init; get; }
|
||||
|
||||
public Property.Models.Configuration PropertyConfiguration => _PropertyConfiguration;
|
||||
|
||||
@ -16,11 +17,13 @@ public class Configuration
|
||||
public Configuration(
|
||||
string[] ignoreExtensions,
|
||||
string personBirthdayFormat,
|
||||
Property.Models.Configuration propertyConfiguration)
|
||||
Property.Models.Configuration propertyConfiguration,
|
||||
string saveDirectory)
|
||||
{
|
||||
IgnoreExtensions = ignoreExtensions;
|
||||
PersonBirthdayFormat = personBirthdayFormat;
|
||||
_PropertyConfiguration = propertyConfiguration;
|
||||
SaveDirectory = saveDirectory;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
Reference in New Issue
Block a user