35 lines
934 B
C#
35 lines
934 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace View_by_Distance.Date.Group.Models;
|
|
|
|
public class AppSettings
|
|
{
|
|
|
|
protected string _Company;
|
|
protected string _WorkingDirectoryName;
|
|
protected int? _MaxDegreeOfParallelism;
|
|
public string Company => _Company;
|
|
public string WorkingDirectoryName => _WorkingDirectoryName;
|
|
public int? MaxDegreeOfParallelism => _MaxDegreeOfParallelism;
|
|
|
|
// public AppSettings()
|
|
// {
|
|
|
|
// }
|
|
|
|
[JsonConstructor]
|
|
public AppSettings(string company, string workingDirectoryName, int? maxDegreeOfParallelism)
|
|
{
|
|
_Company = company;
|
|
_WorkingDirectoryName = workingDirectoryName;
|
|
_MaxDegreeOfParallelism = maxDegreeOfParallelism;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
} |