26 lines
786 B
C#
26 lines
786 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json;
|
|
|
|
namespace View_by_Distance.PrepareForOld.Models.Binder;
|
|
|
|
public class AppSettings
|
|
{
|
|
|
|
[Display(Name = "Company"), Required] public string Company { get; set; }
|
|
[Display(Name = "Working Directory Name"), Required] public string WorkingDirectoryName { get; set; }
|
|
[Display(Name = "Max Degree Of Parallelism"), Required] public int? MaxDegreeOfParallelism { get; set; }
|
|
|
|
public AppSettings()
|
|
{
|
|
Company = string.Empty;
|
|
WorkingDirectoryName = string.Empty;
|
|
MaxDegreeOfParallelism = -1;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
} |