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.Shared.Models;
|
||
|
||
public class MappingFromLocation : Properties.IMappingFromLocation
|
||
{
|
||
|
||
public int AreaPermyriad { init; get; }
|
||
public int ConfidencePercent { init; get; }
|
||
public string DeterministicHashCodeKey { init; get; }
|
||
public int? Eyeα { init; get; }
|
||
public bool? EyeReview { init; get; }
|
||
public int WholePercentages { init; get; }
|
||
|
||
[JsonConstructor]
|
||
public MappingFromLocation(int areaPermyriad, int confidencePercent, string deterministicHashCodeKey, int? eyeα, bool? eyeReview, int wholePercentages)
|
||
{
|
||
AreaPermyriad = areaPermyriad;
|
||
ConfidencePercent = confidencePercent;
|
||
DeterministicHashCodeKey = deterministicHashCodeKey;
|
||
Eyeα = eyeα;
|
||
EyeReview = eyeReview;
|
||
WholePercentages = wholePercentages;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||
return result;
|
||
}
|
||
|
||
} |