Mike Phares d4cbea3835 Any
MoveToDecade
2023-08-06 17:19:06 -07:00

45 lines
1.9 KiB
C#

namespace View_by_Distance.Shared.Models.Stateless.Methods;
public interface IPerson
{
// ...
static (char, char, char) GetPersonHour(string personDisplayDirectoryName, int hour) =>
hour == 0 ? new('U', 'U', 'U') :
hour == 1 ? new('U', 'U', 'U') :
hour == 2 ? new('U', 'U', 'U') :
hour == 3 ? new('A', 'U', 'Y') :
hour == 4 ? new('A', 'F', 'Y') :
hour == 5 ? new('A', 'M', 'Y') :
hour == 6 ? new('A', 'F', 'N') :
hour == 7 ? new('A', 'M', 'N') :
hour == 13 ? new('D', 'U', 'Y') :
hour == 14 ? new('D', 'F', 'Y') :
hour == 15 ? new('D', 'M', 'Y') :
hour == 16 ? new('D', 'F', 'N') :
hour == 17 ? new('D', 'M', 'N') :
throw new NotImplementedException(personDisplayDirectoryName);
static string GetHourGroup(string personDisplayDirectoryName, int hour) =>
hour == 0 ? "Unknown-Unknown-Unknown" :
hour == 1 ? "Unknown-Unknown-Unknown" :
hour == 2 ? "Unknown-Unknown-Unknown" :
hour == 3 ? "Alive-Unknown-Yes" :
hour == 4 ? "Alive-Female-Yes" :
hour == 5 ? "Alive-Male-Yes" :
hour == 6 ? "Alive-Female-No" :
hour == 7 ? "Alive-Male-No" :
hour == 13 ? "Dead-Unknown-Yes" :
hour == 14 ? "Dead-Female-Yes" :
hour == 15 ? "Dead-Male-Yes" :
hour == 16 ? "Dead-Female-No" :
hour == 17 ? "Dead-Male-No" :
throw new NotImplementedException(personDisplayDirectoryName);
bool TestStatic_IsDefaultName(string mappingDefaultName, string personDisplayDirectoryName) =>
IsDefaultName(mappingDefaultName, personDisplayDirectoryName);
static bool IsDefaultName(string mappingDefaultName, string personDisplayDirectoryName) =>
personDisplayDirectoryName == mappingDefaultName || (personDisplayDirectoryName.Length > 1 && personDisplayDirectoryName[0] == 'X' && personDisplayDirectoryName[1] == ']');
}