36 lines
2.8 KiB
C#

namespace View_by_Distance.Shared.Models.Stateless.Methods;
public interface IMapping
{ // ...
int TestStatic_GetAreaPermyriad(int faceAreaPermyriad, int height, Models.Location location, int width)
=> GetAreaPermyriad(faceAreaPermyriad, height, location, width);
static int GetAreaPermyriad(int faceAreaPermyriad, int height, Models.Location location, int width)
=> Mapping.GetAreaPermyriad(faceAreaPermyriad, location.Bottom, height, location.Left, location.Right, location.Top, width);
int TestStatic_GetAreaPermyriad(int faceAreaPermyriad, int bottom, int height, int left, int right, int top, int width)
=> GetAreaPermyriad(faceAreaPermyriad, bottom, height, left, right, top, width);
static int GetAreaPermyriad(int faceAreaPermyriad, int bottom, int height, int left, int right, int top, int width)
=> Mapping.GetAreaPermyriad(faceAreaPermyriad, bottom, height, left, right, top, width);
int TestStatic_GetAreaPermyriad(int faceAreaPermyriad, Models.Location location, Models.OutputResolution outputResolution)
=> GetAreaPermyriad(faceAreaPermyriad, location, outputResolution);
static int GetAreaPermyriad(int faceAreaPermyriad, Models.Location location, Models.OutputResolution outputResolution)
=> Mapping.GetAreaPermyriad(faceAreaPermyriad, location.Bottom, outputResolution.Height, location.Left, location.Right, location.Top, outputResolution.Width);
string TestStatic_GetDeterministicHashCodeKey(FilePath filePath, Models.Location location, int locationDigits, Models.OutputResolution outputResolution)
=> GetDeterministicHashCodeKey(filePath, location, locationDigits, outputResolution);
static string GetDeterministicHashCodeKey(FilePath filePath, Models.Location location, int locationDigits, Models.OutputResolution outputResolution)
=> filePath.IsIntelligentIdFormat ? $"{filePath.FileNameFirstSegment}.{ILocation.GetLeftPadded(locationDigits, ILocation.GetWholePercentages(location, locationDigits, outputResolution))}" : throw new NotImplementedException();
string TestStatic_GetDeterministicHashCodeKey(FilePath filePath, int locationDigits)
=> GetDeterministicHashCodeKey(filePath, locationDigits);
static string GetDeterministicHashCodeKey(FilePath filePath, int locationDigits)
=> filePath.IsIntelligentIdFormat ? $"{filePath.FileNameFirstSegment}.{ILocation.GetLeftPadded(locationDigits, ILocation.GetWholePercentages(locationDigits))}" : throw new NotImplementedException();
int? TestStatic_GetWholePercentages(string facesFileNameExtension, FilePath filePath) =>
GetWholePercentages(facesFileNameExtension, filePath);
static int? GetWholePercentages(string facesFileNameExtension, FilePath filePath) =>
Mapping.GetWholePercentages(facesFileNameExtension, filePath);
}