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

@ -115,7 +115,7 @@ internal class E3_Rename
{
List<string[]> results = new();
if (_Configuration?.PropertyConfiguration is null)
throw new Exception($"{nameof(_Configuration.PropertyConfiguration)} must be set!");
throw new ArgumentNullException(nameof(_Configuration.PropertyConfiguration));
bool add;
string to;
bool exists;
@ -230,7 +230,7 @@ internal class E3_Rename
internal void DirectoryRename(Property.Models.Configuration configuration, Model? model, PredictorModel? predictorModel, string relativePath, string newDirectoryName)
{
if (_Configuration?.PropertyConfiguration is null)
throw new Exception($"{nameof(_Configuration.PropertyConfiguration)} must be set!");
throw new ArgumentNullException(nameof(_Configuration.PropertyConfiguration));
string json;
FileInfo current;
FileInfo fileInfo;
@ -299,7 +299,7 @@ internal class E3_Rename
if (json.Contains(oldValue))
{
json = json.Replace(oldValue, newValue);
if (!Property.Models.Stateless.IPath.WriteAllText(fileInfo.FullName, json, compareBeforeWrite: true))
if (!Property.Models.Stateless.IPath.WriteAllText(fileInfo.FullName, json, updateDateWhenMatches: true, compareBeforeWrite: true))
continue;
File.SetLastWriteTime(fileInfo.FullName, fileInfo.LastWriteTime);
}