Removed Obsolete A_Property Methods

Changed GetDimensions to handle a stream at the end and one exit

Switched to using Action? over IDlibDotNet for Tick method

Switched to using AsReadOnly over new()

Moved Meta Base to Shared
This commit is contained in:
2025-06-30 16:38:30 -07:00
parent c7ded16e50
commit 86f0ff0486
38 changed files with 901 additions and 960 deletions

View File

@ -53,9 +53,9 @@ internal abstract class MapLogic
continue;
personContainers.Add(personContainer);
}
keyValuePairs.Add(wholePercentagesTo.Key, new(personContainers));
keyValuePairs.Add(wholePercentagesTo.Key, personContainers.AsReadOnly());
}
results.Add(idTo.Key, new(keyValuePairs));
results.Add(idTo.Key, keyValuePairs.AsReadOnly());
}
return results.AsReadOnly();
}
@ -110,7 +110,7 @@ internal abstract class MapLogic
List<Face> results = [];
foreach (Item item in items)
{
if (item.ExifDirectory?.FilePath.Id is null || item.ResizedFileHolder is null)
if (item.ExifDirectory?.FilePath?.Id is null || item.ResizedFileHolder is null)
continue;
foreach (Face face in item.Faces)
{
@ -384,7 +384,7 @@ internal abstract class MapLogic
{
Dictionary<int, ReadOnlyDictionary<int, Mapping>> results = [];
foreach (KeyValuePair<int, Dictionary<int, Mapping>> keyValuePair in keyValuePairs)
results.Add(keyValuePair.Key, new(keyValuePair.Value));
results.Add(keyValuePair.Key, keyValuePair.Value.AsReadOnly());
return results.AsReadOnly();
}
@ -602,7 +602,7 @@ internal abstract class MapLogic
if (check)
continue;
personBirthday = IPersonBirthday.GetPersonBirthday(personKey + (oneHour * 2));
personContainer = PersonContainer.Get(approximateYears, [personBirthday], new(personDisplayDirectoryAllFilePaths), configuration.MappingDefaultName, personKey);
personContainer = PersonContainer.Get(approximateYears, [personBirthday], personDisplayDirectoryAllFilePaths.AsReadOnly(), configuration.MappingDefaultName, personKey);
results.Add(personContainer);
if (results.Count > 99)
break;
@ -1095,7 +1095,7 @@ internal abstract class MapLogic
}
if (string.IsNullOrEmpty(configuration.LocationContainerDebugDirectory))
{
ReadOnlyCollection<LocationContainer> locationContainers = new(results.OrderBy(l => l.DirectoryNumber).ToArray());
ReadOnlyCollection<LocationContainer> locationContainers = results.OrderBy(l => l.DirectoryNumber).ToArray().AsReadOnly();
LookForPossibleDuplicates(configuration, locationContainers);
}
return results;