33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace View_by_Distance.Duplicate.Search.Models;
|
|
|
|
public class AppSettings
|
|
{
|
|
|
|
public string Company { init; get; }
|
|
public bool IndexOnly { init; get; }
|
|
public int MaxDegreeOfParallelism { init; get; }
|
|
public string OutputExtension { init; get; }
|
|
public bool Reverse { init; get; }
|
|
public string WorkingDirectoryName { init; get; }
|
|
|
|
[JsonConstructor]
|
|
public AppSettings(string company, bool indexOnly, int maxDegreeOfParallelism, string outputExtension, bool reverse, string workingDirectoryName)
|
|
{
|
|
Company = company;
|
|
IndexOnly = indexOnly;
|
|
MaxDegreeOfParallelism = maxDegreeOfParallelism;
|
|
OutputExtension = outputExtension;
|
|
Reverse = reverse;
|
|
WorkingDirectoryName = workingDirectoryName;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
} |