a
This commit is contained in:
Compare/Models
Copy-Distinct/Models/Binder
Date-Group/Models
Delete-By-Relative/Models
Drag-Drop-Explorer/Models
Drag-Drop-Search/Models
Drag-Drop-Set-Property-Item
Duplicate-Search/Models
Instance
DlibDotNet.cs
Models
Map/Models
Metadata-Query/Models/Binder
Metadata/Models
Mirror-Length/Models/Binder
Move-By-Id
Offset-Date-Time-Original/Models/Binder
PrepareForOld/Models
Property/Models
Rename
Resize/Models
Set-Created-Date/Models
Shared
Tests
TestsWithFaceRecognitionDotNet
@ -3,30 +3,22 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace View_by_Distance.Set.Created.Date.Models;
|
||||
|
||||
public class AppSettings
|
||||
public record AppSettings(string Company,
|
||||
string CopyTo,
|
||||
int MaxDegreeOfParallelism,
|
||||
string WorkingDirectoryName)
|
||||
{
|
||||
|
||||
public string Company { init; get; }
|
||||
public string CopyTo { init; get; }
|
||||
public int MaxDegreeOfParallelism { init; get; }
|
||||
public string WorkingDirectoryName { init; get; }
|
||||
|
||||
[JsonConstructor]
|
||||
public AppSettings(string company,
|
||||
string copyTo,
|
||||
int maxDegreeOfParallelism,
|
||||
string workingDirectoryName)
|
||||
{
|
||||
Company = company;
|
||||
CopyTo = copyTo;
|
||||
MaxDegreeOfParallelism = maxDegreeOfParallelism;
|
||||
WorkingDirectoryName = workingDirectoryName;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||||
string result = JsonSerializer.Serialize(this, AppSettingsSourceGenerationContext.Default.AppSettings);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(AppSettings))]
|
||||
internal partial class AppSettingsSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user