GenealogicalDataCommunication
This commit is contained in:
@ -331,6 +331,7 @@ internal abstract class MapLogic
|
||||
{
|
||||
(long, PersonContainer)[] results;
|
||||
const int zero = 0;
|
||||
List<string> errors = new();
|
||||
string newestPersonKeyFormatted;
|
||||
List<(long PersonKey, PersonContainer PersonContainer)> collection = new();
|
||||
foreach (PersonContainer personContainer in personContainers)
|
||||
@ -347,9 +348,11 @@ internal abstract class MapLogic
|
||||
foreach (KeyValuePair<long, List<PersonContainer>> keyValuePair in personKeyToPersonContainerCollection)
|
||||
{
|
||||
if (keyValuePair.Value.Count != 1 && (from l in keyValuePair.Value select l.DisplayDirectoryName).Distinct().Count() != 1)
|
||||
throw new NotSupportedException(keyValuePair.Value[zero].DisplayDirectoryName);
|
||||
errors.Add(keyValuePair.Value[zero].DisplayDirectoryName);
|
||||
collection.Add(new(keyValuePair.Key, keyValuePair.Value[zero]));
|
||||
}
|
||||
if (errors.Any())
|
||||
throw new Exception(string.Join(Environment.NewLine, errors));
|
||||
results = (from l in collection orderby l.PersonKey descending select (l.PersonKey, l.PersonContainer)).ToArray();
|
||||
return results;
|
||||
}
|
||||
|
Reference in New Issue
Block a user