Init
This commit is contained in:
31
Shared/Models/FacePoint.cs
Normal file
31
Shared/Models/FacePoint.cs
Normal file
@ -0,0 +1,31 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user