House Cleaning
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
}
|
Reference in New Issue
Block a user