33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace View_by_Distance.PrepareForOld.Models;
|
|
|
|
public class Configuration
|
|
{
|
|
|
|
protected Property.Models.Configuration _PropertyConfiguration;
|
|
protected readonly string[] _Spelling;
|
|
public Property.Models.Configuration PropertyConfiguration => _PropertyConfiguration;
|
|
public string[] Spelling => _Spelling;
|
|
|
|
[JsonConstructor]
|
|
public Configuration(Property.Models.Configuration propertyConfiguration, string[] spelling)
|
|
{
|
|
_PropertyConfiguration = propertyConfiguration;
|
|
_Spelling = spelling;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
public void SetAndUpdate(Property.Models.Configuration configuration, int? numberOfJitters, int? numberOfTimesToUpsample, string? modelName, string? predictorModelName)
|
|
{
|
|
_PropertyConfiguration = configuration;
|
|
_PropertyConfiguration.Update(numberOfJitters, numberOfTimesToUpsample, modelName, predictorModelName);
|
|
}
|
|
|
|
} |