diff --git a/Distance/Models/Stateless/FilterLogicB.cs b/Distance/Models/Stateless/FilterLogicB.cs index d46d90f..f36d0a5 100644 --- a/Distance/Models/Stateless/FilterLogicB.cs +++ b/Distance/Models/Stateless/FilterLogicB.cs @@ -47,16 +47,16 @@ internal static class FilterLogicB RectangleF? rectangle = Shared.Models.Stateless.ILocation.GetPercentagesRectangle(distanceSettings, wholePercentages.Value); if (rectangle is null) return; - LocationContainer locationContainer = new(dateOnly, - exifDirectory, - exifDirectory.Encoding, - faceFile, - exifDirectory.FilePath, - null, - null, - exifDirectory.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName, - rectangle, - wholePercentages); + LocationContainer locationContainer = new(CreationDateOnly: dateOnly, + ExifDirectory: exifDirectory, + Encoding: exifDirectory.Encoding, + FaceFile: faceFile, + FilePath: exifDirectory.FilePath, + LengthPermyriad: null, + LengthSource: null, + PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName: exifDirectory.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName, + Rectangle: rectangle, + WholePercentages: wholePercentages); lock (locationContainers) locationContainers.Add(locationContainer); } diff --git a/Shared/Models/LocationContainer.cs b/Shared/Models/LocationContainer.cs index 583c85d..c474a24 100644 --- a/Shared/Models/LocationContainer.cs +++ b/Shared/Models/LocationContainer.cs @@ -17,32 +17,32 @@ public record LocationContainer(DateOnly? CreationDateOnly, public static LocationContainer Get(LocationContainer locationContainer, object? encoding, bool keepExifDirectory) { LocationContainer result; - result = new(locationContainer.CreationDateOnly, - keepExifDirectory ? locationContainer.ExifDirectory : null, - encoding, - locationContainer.FaceFile, - locationContainer.FilePath, - locationContainer.LengthPermyriad, - locationContainer.LengthSource, - locationContainer.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName, - locationContainer.Rectangle, - locationContainer.WholePercentages); + result = new(CreationDateOnly: locationContainer.CreationDateOnly, + ExifDirectory: keepExifDirectory ? locationContainer.ExifDirectory : null, + Encoding: encoding, + FaceFile: locationContainer.FaceFile, + FilePath: locationContainer.FilePath, + LengthPermyriad: locationContainer.LengthPermyriad, + LengthSource: locationContainer.LengthSource, + PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName: locationContainer.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName, + Rectangle: locationContainer.Rectangle, + WholePercentages: locationContainer.WholePercentages); return result; } public static LocationContainer Get(LocationContainer source, LocationContainer locationContainer, int lengthPermyriad, bool keepExifDirectory, bool keepEncoding) { LocationContainer result; - result = new(locationContainer.CreationDateOnly, - keepExifDirectory ? locationContainer.ExifDirectory : null, - keepEncoding ? locationContainer.Encoding : null, - locationContainer.FaceFile, - locationContainer.FilePath, - lengthPermyriad, - source.FilePath, - locationContainer.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName, - locationContainer.Rectangle, - locationContainer.WholePercentages); + result = new(CreationDateOnly: locationContainer.CreationDateOnly, + ExifDirectory: keepExifDirectory ? locationContainer.ExifDirectory : null, + Encoding: keepEncoding ? locationContainer.Encoding : null, + FaceFile: locationContainer.FaceFile, + FilePath: locationContainer.FilePath, + LengthPermyriad: lengthPermyriad, + LengthSource: source.FilePath, + PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName: locationContainer.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName, + Rectangle: locationContainer.Rectangle, + WholePercentages: locationContainer.WholePercentages); return result; } diff --git a/Shared/Models/Stateless/ILocation.cs b/Shared/Models/Stateless/ILocation.cs index 6967d47..b494be8 100644 --- a/Shared/Models/Stateless/ILocation.cs +++ b/Shared/Models/Stateless/ILocation.cs @@ -14,12 +14,12 @@ public interface ILocation TrimBound(detectionConfidence, rectangle, width, height, facesCount); static Models.Location TrimBound(double detectionConfidence, Rectangle rectangle, int width, int height, int facesCount) => Models.Location.Get(Math.Min(rectangle.Bottom, height), - detectionConfidence, - height, - Math.Max(rectangle.Left, 0), - Math.Min(rectangle.Right, width), - Math.Max(rectangle.Top, 0), - width, - facesCount); + detectionConfidence, + height, + Math.Max(rectangle.Left, 0), + Math.Min(rectangle.Right, width), + Math.Max(rectangle.Top, 0), + width, + facesCount); } \ No newline at end of file