30 lines
927 B
C#
30 lines
927 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace View_by_Distance.Shared.Models;
|
|
|
|
public class MappingFromLocation : Properties.IMappingFromLocation
|
|
{
|
|
|
|
public int AreaPermyriad { init; get; }
|
|
public int ConfidencePercent { init; get; }
|
|
public string DeterministicHashCodeKey { init; get; }
|
|
public int NormalizedRectangle { init; get; }
|
|
|
|
[JsonConstructor]
|
|
public MappingFromLocation(int areaPermyriad, int confidencePercent, string deterministicHashCodeKey, int normalizedRectangle)
|
|
{
|
|
AreaPermyriad = areaPermyriad;
|
|
ConfidencePercent = confidencePercent;
|
|
DeterministicHashCodeKey = deterministicHashCodeKey;
|
|
NormalizedRectangle = normalizedRectangle;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
}
|