Closest is usable with

NamedDeterministicHashCodeIdAndFaceLocationIndex
This commit is contained in:
2022-08-14 19:52:30 -07:00
parent e4f422cf7e
commit 004017b9dd
13 changed files with 325 additions and 208 deletions

View File

@ -85,27 +85,21 @@ public class B_Metadata
throw new NullReferenceException(nameof(item.Property.Id));
if (item.ImageFileHolder is null)
throw new NullReferenceException(nameof(item.ImageFileHolder));
if (string.IsNullOrEmpty(bResultsFullGroupDirectory))
throw new NullReferenceException(nameof(bResultsFullGroupDirectory));
Dictionary<string, List<KeyValuePair<string, string>>>? dictionary;
string json = string.Empty;
string[] changesFrom = Array.Empty<string>();
Dictionary<string, List<KeyValuePair<string, string>>>? dictionary;
List<DateTime> dateTimes = (from l in subFileTuples where changesFrom.Contains(l.Item1) select l.Item2).ToList();
FileInfo fileInfo = new(Path.Combine(AngleBracketCollection[0].Replace("<>", "{}"), string.Concat(item.ImageFileHolder.NameWithoutExtension, ".json")));
string bMetadataSingletonFile = Path.Combine(bResultsFullGroupDirectory, "{}", "_ _ _", $"{item.Property.Id.Value}{item.ImageFileHolder.ExtensionLowered}.json");
if (fileInfo.Exists)
string usingRelativePath = Path.Combine(AngleBracketCollection[0].Replace("<>", "{}"), string.Concat(item.ImageFileHolder.NameWithoutExtension, ".json"));
string bMetadataSingletonFile = Path.Combine(bResultsFullGroupDirectory, "{}", Property.Models.Stateless.IResult.AllInOne, $"{item.Property.Id.Value}{item.ImageFileHolder.ExtensionLowered}.json");
FileInfo fileInfo = new(bMetadataSingletonFile);
if (!fileInfo.Exists)
{
if (!File.Exists(bMetadataSingletonFile))
if (File.Exists(usingRelativePath))
{
fileInfo.MoveTo(bMetadataSingletonFile);
fileInfo = new(bMetadataSingletonFile);
File.Move(usingRelativePath, fileInfo.FullName);
fileInfo.Refresh();
}
}
else
{
if (File.Exists(bMetadataSingletonFile))
fileInfo = new(bMetadataSingletonFile);
else
if (!fileInfo.Exists)
{
if (fileInfo.Directory?.Parent is null)
throw new Exception();