Init
This commit is contained in:
57
Shared/Models/Face.cs
Normal file
57
Shared/Models/Face.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using View_by_Distance.Shared.Models.Methods;
|
||||
|
||||
namespace View_by_Distance.Shared.Models;
|
||||
|
||||
public class Face : Properties.IFace, IFace
|
||||
{
|
||||
|
||||
protected double? _Α;
|
||||
protected DateTime _DateTime;
|
||||
protected Models.FaceEncoding _FaceEncoding;
|
||||
protected Dictionary<string, Models.FacePoint[]> _FaceLandmarks;
|
||||
protected Models.OutputResolution _OutputResolution;
|
||||
protected Models.Location _Location;
|
||||
protected int? _LocationIndex;
|
||||
protected bool _Populated;
|
||||
protected string _RelativePath;
|
||||
public double? α => _Α;
|
||||
public DateTime DateTime => _DateTime;
|
||||
public Models.FaceEncoding FaceEncoding => _FaceEncoding;
|
||||
public Dictionary<string, Models.FacePoint[]> FaceLandmarks => _FaceLandmarks;
|
||||
public Models.OutputResolution OutputResolution => _OutputResolution;
|
||||
public Models.Location Location => _Location;
|
||||
public int? LocationIndex => _LocationIndex;
|
||||
public bool Populated => _Populated;
|
||||
public string RelativePath => _RelativePath;
|
||||
|
||||
[JsonConstructor]
|
||||
public Face(double? α, DateTime dateTime, View_by_Distance.Shared.Models.FaceEncoding faceEncoding, Dictionary<string, View_by_Distance.Shared.Models.FacePoint[]> faceLandmarks, Models.OutputResolution outputResolution, View_by_Distance.Shared.Models.Location location, int? locationIndex, bool populated, string relativePath)
|
||||
{
|
||||
_Α = α;
|
||||
_DateTime = dateTime;
|
||||
_FaceEncoding = faceEncoding;
|
||||
_FaceLandmarks = faceLandmarks;
|
||||
_Location = location;
|
||||
_LocationIndex = locationIndex;
|
||||
_OutputResolution = outputResolution;
|
||||
_Populated = populated;
|
||||
_RelativePath = relativePath;
|
||||
}
|
||||
|
||||
double Stateless.Methods.IFace.TestStatic_Getα(int x1, int x2, int y1, int y2) => throw new NotImplementedException();
|
||||
|
||||
string Stateless.Methods.IFace.TestStatic_GetJson(string jsonFileFullName) => throw new NotImplementedException();
|
||||
|
||||
Face Stateless.Methods.IFace.TestStatic_GetFace(string jsonFileFullName) => throw new NotImplementedException();
|
||||
|
||||
Face[] Stateless.Methods.IFace.TestStatic_GetFaces(string jsonFileFullName) => throw new NotImplementedException();
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user