31 lines
986 B
C#
31 lines
986 B
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 Set(Property.Models.Configuration propertyConfiguration) => _PropertyConfiguration = propertyConfiguration;
|
|
|
|
public void Update() => _PropertyConfiguration?.Update();
|
|
|
|
} |