Reuse count over t
FilePath over String Support first run better Bump
This commit is contained in:
@ -829,18 +829,19 @@ public partial class MapLogic : Shared.Models.Methods.IMapLogic
|
||||
private string? GetDisplayDirectoryName(string? displayDirectoryName, LocationContainer locationContainer, ReadOnlyDictionary<long, PersonContainer> personKeyToPersonContainer)
|
||||
{
|
||||
string? result = displayDirectoryName;
|
||||
if (personKeyToPersonContainer.Count == 0)
|
||||
throw new NotImplementedException(nameof(GetPersonKeyToPersonContainer));
|
||||
ReadOnlyDictionary<int, ReadOnlyCollection<PersonContainer>>? wholePercentagesToPersonContainers = GetWholePercentagesToPersonContainers(locationContainer.Id);
|
||||
if (wholePercentagesToPersonContainers is not null)
|
||||
if (personKeyToPersonContainer.Count != 0)
|
||||
{
|
||||
foreach (KeyValuePair<int, ReadOnlyCollection<PersonContainer>> keyValuePair in wholePercentagesToPersonContainers)
|
||||
ReadOnlyDictionary<int, ReadOnlyCollection<PersonContainer>>? wholePercentagesToPersonContainers = GetWholePercentagesToPersonContainers(locationContainer.Id);
|
||||
if (wholePercentagesToPersonContainers is not null)
|
||||
{
|
||||
if (keyValuePair.Key != locationContainer.WholePercentages)
|
||||
continue;
|
||||
if (keyValuePair.Value.Count != 1)
|
||||
continue;
|
||||
result = keyValuePair.Value[0].DisplayDirectoryName;
|
||||
foreach (KeyValuePair<int, ReadOnlyCollection<PersonContainer>> keyValuePair in wholePercentagesToPersonContainers)
|
||||
{
|
||||
if (keyValuePair.Key != locationContainer.WholePercentages)
|
||||
continue;
|
||||
if (keyValuePair.Value.Count != 1)
|
||||
continue;
|
||||
result = keyValuePair.Value[0].DisplayDirectoryName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -325,7 +325,7 @@ internal abstract class MapLogic
|
||||
continue;
|
||||
}
|
||||
if (!personKeyFormattedToPersonContainer.TryGetValue(personKeyFormattedIdThenWholePercentages.PersonKeyFormatted, out personContainer))
|
||||
throw new Exception();
|
||||
continue;
|
||||
if (!results.TryGetValue(personKeyFormattedIdThenWholePercentages.Id, out idTo))
|
||||
{
|
||||
results.Add(personKeyFormattedIdThenWholePercentages.Id, []);
|
||||
@ -735,7 +735,7 @@ internal abstract class MapLogic
|
||||
personDisplayDirectoryName = personKeyFormattedIdThenWholePercentages.PersonDisplayDirectoryName is null ? configuration.MappingDefaultName : personKeyFormattedIdThenWholePercentages.PersonDisplayDirectoryName;
|
||||
matches = configuration.PersonCharacters.Where(l => personDisplayDirectoryName.Contains(l)).ToArray();
|
||||
if (matches.Length == 0)
|
||||
throw new NotSupportedException();
|
||||
continue;
|
||||
group = IPerson.GetHourGroup(personKeyFormattedIdThenWholePercentages.PersonDisplayDirectoryName, personBirthday.Value.Hour);
|
||||
(status, sex, first) = IPerson.GetPersonHour(personKeyFormattedIdThenWholePercentages.PersonDisplayDirectoryName, personBirthday.Value.Hour);
|
||||
personDirectory = new(matches.First(), group, status, sex, first);
|
||||
|
Reference in New Issue
Block a user