After testing E_Distance.SaveGroupedFaceEncodings

This commit is contained in:
2022-08-07 12:29:46 -07:00
parent 2158b4cfc2
commit daf5f428b9
57 changed files with 2626 additions and 660 deletions

View File

@ -33,7 +33,7 @@ public class PropertyCompareLogic
{
List<PropertyCompare> results = new();
if (_Log is null)
throw new Exception($"{nameof(_Log)} is null!");
throw new ArgumentNullException(nameof(_Log));
int index;
string value;
long[] distinctNumberValues;
@ -81,7 +81,7 @@ public class PropertyCompareLogic
{
List<string[]> fromThenToCollection = new();
if (_Log is null)
throw new Exception($"{nameof(_Log)} is null!");
throw new ArgumentNullException(nameof(_Log));
int z = 0;
string to;
string from;
@ -177,7 +177,7 @@ public class PropertyCompareLogic
string json = File.ReadAllText(jsonFile);
A_Property? property = JsonSerializer.Deserialize<A_Property>(json);
if (property?.Id is null)
throw new Exception($"{nameof(property)} is null!");
throw new ArgumentNullException(nameof(property));
DateTime minimumDateTime = Property.Models.Stateless.A_Property.GetMinimumDateTime(property);
corrected = string.Concat(relativeDirectory, jsonFileNameWithoutExtension);
if (_SpellingFindReplace is not null && (from l in _SpellingFindReplace where corrected.Contains(l.Find) select true).Any())
@ -251,7 +251,7 @@ public class PropertyCompareLogic
{
List<PropertyCompare> results = new();
if (_Log is null)
throw new Exception($"{nameof(_Log)} is null!");
throw new ArgumentNullException(nameof(_Log));
string[] files;
int totalSeconds;
string directory;
@ -319,7 +319,7 @@ public class PropertyCompareLogic
private void MoveFiles(string[] directories, List<string[]> fromThenToCollection)
{
if (_Log is null)
throw new Exception($"{nameof(_Log)} is null!");
throw new ArgumentNullException(nameof(_Log));
int z;
string to;
string from;
@ -406,7 +406,7 @@ public class PropertyCompareLogic
public void SaveDiffFiles(string aPropertyCollectionDirectory, int loadLessThan, PropertyCompare[] propertyCompares, PropertyCompare[]? diffPropertyCompares)
{
if (_Log is null)
throw new Exception($"{nameof(_Log)} is null!");
throw new ArgumentNullException(nameof(_Log));
string text;
string[] lines;
string fileName;
@ -459,7 +459,7 @@ public class PropertyCompareLogic
public void SaveLogAndMoveFiles(string aPropertyCollectionDirectory, int loadLessThan, PropertyCompare[] propertyCompares, PropertyCompare[]? diffPropertyCompares, int i)
{
if (_Log is null)
throw new Exception($"{nameof(_Log)} is null!");
throw new ArgumentNullException(nameof(_Log));
List<string> lines;
string checkDirectory;
string[] toDirectories;
@ -498,7 +498,7 @@ public class PropertyCompareLogic
public void WithSubdirectory(string propertyDirectory, bool subDirectoriesAny, string fileName, bool renameCompare, bool deleteArg)
{
if (_Log is null)
throw new Exception($"{nameof(_Log)} is null!");
throw new ArgumentNullException(nameof(_Log));
List<string[]> fileCollection = new();
if (renameCompare && deleteArg)
throw new Exception();