31 lines
687 B
C#
31 lines
687 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
using View_by_Distance.Shared.Models.Methods;
|
|
|
|
namespace View_by_Distance.Shared.Models;
|
|
|
|
public class FacePoint : Properties.IFacePoint, IFacePoint
|
|
{
|
|
|
|
protected int _Index;
|
|
protected int _X;
|
|
protected int _Y;
|
|
public int Index => _Index;
|
|
public int X => _X;
|
|
public int Y => _Y;
|
|
|
|
[JsonConstructor]
|
|
public FacePoint(int index, int x, int y)
|
|
{
|
|
_Index = index;
|
|
_X = x;
|
|
_Y = y;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
} |