AA.Compare Project to Match not runToDoCollectionFirst

Removed Layered AppSettings with Nested Objects at First Level
This commit is contained in:
2024-12-28 19:34:09 -07:00
parent 3ff8153393
commit 0215e838e7
110 changed files with 6331 additions and 1275 deletions

View File

@ -7,6 +7,8 @@ namespace View_by_Distance.Shared.Models.Stateless;
internal abstract class XDate
{
private record Record(bool? IsWrongYear, string[] Years);
internal static (int Season, string seasonName) GetSeason(int dayOfYear)
{
(int Season, string seasonName) result = dayOfYear switch
@ -23,9 +25,10 @@ internal abstract class XDate
return result;
}
private static (bool?, string[]) IsWrongYear(string[] segments, string year)
private static Record IsWrongYear(string[] segments, string year)
{
bool? result;
Record result;
bool? check;
string[] results = (
from l
in segments
@ -48,10 +51,11 @@ internal abstract class XDate
select l
).ToArray();
if (results.Length == 0)
result = null;
check = null;
else
result = matches.Length == 0;
return new(result, results);
check = matches.Length == 0;
result = new(check, results);
return result;
}
internal static (bool?, string[]) IsWrongYear(FilePath filePath, ExifDirectory exifDirectory)
@ -215,7 +219,7 @@ internal abstract class XDate
}
if (results.Count == 0)
{
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(exifDirectory.OriginalFileName);
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(exifDirectory.FilePath.Name);
DateTime? dateTime = GetDateTimeFromName(fileNameWithoutExtension);
if (dateTime is not null)
results.Add(dateTime.Value);
@ -235,7 +239,7 @@ internal abstract class XDate
results.Add(fileMetadataDirectory.FileModifiedDate.Value);
}
}
return new(results);
return results.AsReadOnly();
}
internal static DateTime GetMinimum(ExifDirectory exifDirectory)