2022-05-08 12:28:50 -07:00

57 lines
2.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}
}