Any
MoveToDecade
This commit is contained in:
@ -103,7 +103,7 @@ internal abstract class PersonContainer
|
||||
foreach ((string personKeyFormatted, Models.PersonBirthday personBirthday) in collection)
|
||||
{
|
||||
orderedPersonBirthdays = (from l in collection where !l.PersonKeyFormatted.Contains(numberSign) orderby l.PersonBirthday.Value.Ticks descending select l.PersonBirthday).ToArray();
|
||||
if (!orderedPersonBirthdays.Any())
|
||||
if (orderedPersonBirthdays.Length == 0)
|
||||
personKey = collection[zero].PersonBirthday.Value.Ticks;
|
||||
else
|
||||
{
|
||||
@ -113,7 +113,7 @@ internal abstract class PersonContainer
|
||||
}
|
||||
personKeyDirectory = Path.Combine(personDisplayDirectory, personKeyFormatted);
|
||||
files = Directory.GetFiles(personKeyDirectory, "*", SearchOption.AllDirectories);
|
||||
if (!files.Any())
|
||||
if (files.Length == 0)
|
||||
continue;
|
||||
personDisplayDirectoryAllFiles.AddRange(files.Where(l => l.EndsWith(".rel")));
|
||||
personContainer = new(approximateYears, orderedPersonBirthdays, personDisplayDirectoryAllFiles.ToArray(), personDisplayDirectoryName, personKey, personDirectory);
|
||||
@ -127,7 +127,7 @@ internal abstract class PersonContainer
|
||||
string? result;
|
||||
if (approximateYears is null)
|
||||
throw new NotSupportedException();
|
||||
if (!collection.Any())
|
||||
if (collection.Count == 0)
|
||||
throw new NotSupportedException();
|
||||
const int zero = 0;
|
||||
int? updateApproximateYears;
|
||||
@ -225,7 +225,7 @@ internal abstract class PersonContainer
|
||||
{
|
||||
innerGroupDirectoryName = Path.GetFileName(innerGroupDirectory);
|
||||
segments = innerGroupDirectoryName.Split('-');
|
||||
if (!segments.Any())
|
||||
if (segments.Length == 0)
|
||||
throw new NotSupportedException("Misplaced directory!");
|
||||
if (segments.Length != 3)
|
||||
continue;
|
||||
@ -285,7 +285,7 @@ internal abstract class PersonContainer
|
||||
_ = Directory.CreateDirectory(a2PeopleSingletonDirectoryChar);
|
||||
}
|
||||
string[] groupDirectories = Directory.GetDirectories(a2PeopleSingletonDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
if (!groupDirectories.Any())
|
||||
if (groupDirectories.Length == 0)
|
||||
results = new();
|
||||
else
|
||||
results = GetPersonContainersGroups(personBirthdayFormat, facesFileNameExtension, personCharacters, groupDirectories);
|
||||
|
Reference in New Issue
Block a user