House Cleaning
This commit is contained in:
@ -47,16 +47,16 @@ internal static class FilterLogicB
|
|||||||
RectangleF? rectangle = Shared.Models.Stateless.ILocation.GetPercentagesRectangle(distanceSettings, wholePercentages.Value);
|
RectangleF? rectangle = Shared.Models.Stateless.ILocation.GetPercentagesRectangle(distanceSettings, wholePercentages.Value);
|
||||||
if (rectangle is null)
|
if (rectangle is null)
|
||||||
return;
|
return;
|
||||||
LocationContainer locationContainer = new(dateOnly,
|
LocationContainer locationContainer = new(CreationDateOnly: dateOnly,
|
||||||
exifDirectory,
|
ExifDirectory: exifDirectory,
|
||||||
exifDirectory.Encoding,
|
Encoding: exifDirectory.Encoding,
|
||||||
faceFile,
|
FaceFile: faceFile,
|
||||||
exifDirectory.FilePath,
|
FilePath: exifDirectory.FilePath,
|
||||||
null,
|
LengthPermyriad: null,
|
||||||
null,
|
LengthSource: null,
|
||||||
exifDirectory.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName,
|
PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName: exifDirectory.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName,
|
||||||
rectangle,
|
Rectangle: rectangle,
|
||||||
wholePercentages);
|
WholePercentages: wholePercentages);
|
||||||
lock (locationContainers)
|
lock (locationContainers)
|
||||||
locationContainers.Add(locationContainer);
|
locationContainers.Add(locationContainer);
|
||||||
}
|
}
|
||||||
|
@ -17,32 +17,32 @@ public record LocationContainer(DateOnly? CreationDateOnly,
|
|||||||
public static LocationContainer Get(LocationContainer locationContainer, object? encoding, bool keepExifDirectory)
|
public static LocationContainer Get(LocationContainer locationContainer, object? encoding, bool keepExifDirectory)
|
||||||
{
|
{
|
||||||
LocationContainer result;
|
LocationContainer result;
|
||||||
result = new(locationContainer.CreationDateOnly,
|
result = new(CreationDateOnly: locationContainer.CreationDateOnly,
|
||||||
keepExifDirectory ? locationContainer.ExifDirectory : null,
|
ExifDirectory: keepExifDirectory ? locationContainer.ExifDirectory : null,
|
||||||
encoding,
|
Encoding: encoding,
|
||||||
locationContainer.FaceFile,
|
FaceFile: locationContainer.FaceFile,
|
||||||
locationContainer.FilePath,
|
FilePath: locationContainer.FilePath,
|
||||||
locationContainer.LengthPermyriad,
|
LengthPermyriad: locationContainer.LengthPermyriad,
|
||||||
locationContainer.LengthSource,
|
LengthSource: locationContainer.LengthSource,
|
||||||
locationContainer.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName,
|
PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName: locationContainer.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName,
|
||||||
locationContainer.Rectangle,
|
Rectangle: locationContainer.Rectangle,
|
||||||
locationContainer.WholePercentages);
|
WholePercentages: locationContainer.WholePercentages);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LocationContainer Get(LocationContainer source, LocationContainer locationContainer, int lengthPermyriad, bool keepExifDirectory, bool keepEncoding)
|
public static LocationContainer Get(LocationContainer source, LocationContainer locationContainer, int lengthPermyriad, bool keepExifDirectory, bool keepEncoding)
|
||||||
{
|
{
|
||||||
LocationContainer result;
|
LocationContainer result;
|
||||||
result = new(locationContainer.CreationDateOnly,
|
result = new(CreationDateOnly: locationContainer.CreationDateOnly,
|
||||||
keepExifDirectory ? locationContainer.ExifDirectory : null,
|
ExifDirectory: keepExifDirectory ? locationContainer.ExifDirectory : null,
|
||||||
keepEncoding ? locationContainer.Encoding : null,
|
Encoding: keepEncoding ? locationContainer.Encoding : null,
|
||||||
locationContainer.FaceFile,
|
FaceFile: locationContainer.FaceFile,
|
||||||
locationContainer.FilePath,
|
FilePath: locationContainer.FilePath,
|
||||||
lengthPermyriad,
|
LengthPermyriad: lengthPermyriad,
|
||||||
source.FilePath,
|
LengthSource: source.FilePath,
|
||||||
locationContainer.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName,
|
PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName: locationContainer.PersonKeyFormattedAndKeyTicksAndDisplayDirectoryName,
|
||||||
locationContainer.Rectangle,
|
Rectangle: locationContainer.Rectangle,
|
||||||
locationContainer.WholePercentages);
|
WholePercentages: locationContainer.WholePercentages);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@ public interface ILocation
|
|||||||
TrimBound(detectionConfidence, rectangle, width, height, facesCount);
|
TrimBound(detectionConfidence, rectangle, width, height, facesCount);
|
||||||
static Models.Location TrimBound(double detectionConfidence, Rectangle rectangle, int width, int height, int facesCount) =>
|
static Models.Location TrimBound(double detectionConfidence, Rectangle rectangle, int width, int height, int facesCount) =>
|
||||||
Models.Location.Get(Math.Min(rectangle.Bottom, height),
|
Models.Location.Get(Math.Min(rectangle.Bottom, height),
|
||||||
detectionConfidence,
|
detectionConfidence,
|
||||||
height,
|
height,
|
||||||
Math.Max(rectangle.Left, 0),
|
Math.Max(rectangle.Left, 0),
|
||||||
Math.Min(rectangle.Right, width),
|
Math.Min(rectangle.Right, width),
|
||||||
Math.Max(rectangle.Top, 0),
|
Math.Max(rectangle.Top, 0),
|
||||||
width,
|
width,
|
||||||
facesCount);
|
facesCount);
|
||||||
|
|
||||||
}
|
}
|
Reference in New Issue
Block a user