Move const usage out of Shared

This commit is contained in:
2022-09-14 22:32:37 -07:00
parent ad28ab2d38
commit 409c020426
28 changed files with 190 additions and 160 deletions

View File

@ -159,7 +159,7 @@ public class D_Face
continue;
if (face.FaceEncoding is null || face?.Location is null)
continue;
location = Shared.Models.Stateless.Methods.ILocation.GetLocation(face.Location, source.Height, source.Width, collection.Count);
location = Shared.Models.Stateless.Methods.ILocation.GetLocation(face.Location, ILocation.Digits, ILocation.Factor, source.Height, source.Width, collection.Count);
if (location is null)
continue;
width = location.Right - location.Left;
@ -173,7 +173,7 @@ public class D_Face
}
if (File.Exists(fileName))
File.Delete(fileName);
location = Shared.Models.Stateless.Methods.ILocation.GetLocation(IFaceDistance.HiddenImageFactor, face.Location, source.Height, source.Width, collection.Count);
location = Shared.Models.Stateless.Methods.ILocation.GetLocation(IFaceDistance.HiddenImageFactor, face.Location, ILocation.Digits, ILocation.Factor, source.Height, source.Width, collection.Count);
if (location is null)
continue;
width = location.Right - location.Left;
@ -330,7 +330,7 @@ public class D_Face
}
if (_Configuration.ForceFaceLastWriteTimeToCreationTime)
{
results = (from l in results select new Face(results.Count, l)).ToList();
results = (from l in results select new Face(ILocation.Digits, ILocation.Factor, results.Count, l)).ToList();
normalizedPixelPercentageCollection = Shared.Models.Stateless.Methods.IFace.GetInts(results);
normalizedPixelPercentageDistinctCount = normalizedPixelPercentageCollection.Distinct().Count();
if (normalizedPixelPercentageDistinctCount != normalizedPixelPercentageCollection.Length)