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

@ -65,37 +65,37 @@ public class Configuration
public static void Verify(Configuration? propertyConfiguration)
{
if (propertyConfiguration is null)
throw new Exception($"{nameof(propertyConfiguration)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration));
if (propertyConfiguration.ForcePropertyLastWriteTimeToCreationTime is null)
throw new Exception($"{nameof(propertyConfiguration.ForcePropertyLastWriteTimeToCreationTime)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration.ForcePropertyLastWriteTimeToCreationTime));
if (propertyConfiguration.IgnoreExtensions is null || !propertyConfiguration.IgnoreExtensions.Any())
throw new Exception($"{nameof(propertyConfiguration.IgnoreExtensions)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration.IgnoreExtensions));
if (propertyConfiguration.PopulatePropertyId is null)
throw new Exception($"{nameof(propertyConfiguration.PopulatePropertyId)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration.PopulatePropertyId));
if (propertyConfiguration.PropertiesChangedForProperty is null)
throw new Exception($"{nameof(propertyConfiguration.PropertiesChangedForProperty)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration.PropertiesChangedForProperty));
if (propertyConfiguration.PropertyContentCollectionFiles is null)
throw new Exception($"{nameof(propertyConfiguration.PropertyContentCollectionFiles)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration.PropertyContentCollectionFiles));
if (propertyConfiguration.ValidImageFormatExtensions is null || !propertyConfiguration.ValidImageFormatExtensions.Any())
throw new Exception($"{nameof(propertyConfiguration.ValidImageFormatExtensions)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration.ValidImageFormatExtensions));
if (propertyConfiguration.ValidMetadataExtensions is null || !propertyConfiguration.ValidMetadataExtensions.Any())
throw new Exception($"{nameof(propertyConfiguration.ValidMetadataExtensions)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration.ValidMetadataExtensions));
if (propertyConfiguration.VerifyToSeason is null || !propertyConfiguration.VerifyToSeason.Any())
throw new Exception($"{nameof(propertyConfiguration.VerifyToSeason)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration.VerifyToSeason));
if (propertyConfiguration.WriteBitmapDataBytes is null)
throw new Exception($"{nameof(propertyConfiguration.WriteBitmapDataBytes)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration.WriteBitmapDataBytes));
if (Path.GetPathRoot(propertyConfiguration.RootDirectory) == propertyConfiguration.RootDirectory)
throw new Exception($"{nameof(propertyConfiguration.RootDirectory)} should have at least one level!");
throw new ArgumentNullException(nameof(propertyConfiguration.RootDirectory));
if (propertyConfiguration is null)
throw new Exception($"{nameof(propertyConfiguration)} must be set!");
throw new ArgumentNullException(nameof(propertyConfiguration));
if (string.IsNullOrEmpty(propertyConfiguration.DateGroup))
throw new Exception($"{nameof(propertyConfiguration.DateGroup)} must have a value!");
throw new ArgumentNullException(nameof(propertyConfiguration.DateGroup));
if (string.IsNullOrEmpty(propertyConfiguration.FileNameDirectorySeparator))
throw new Exception($"{nameof(propertyConfiguration.FileNameDirectorySeparator)} must have a value!");
throw new ArgumentNullException(nameof(propertyConfiguration.FileNameDirectorySeparator));
if (string.IsNullOrEmpty(propertyConfiguration.Pattern))
throw new Exception($"{nameof(propertyConfiguration.Pattern)} must have a value!");
throw new ArgumentNullException(nameof(propertyConfiguration.Pattern));
if (string.IsNullOrEmpty(propertyConfiguration.RootDirectory) || !Directory.Exists(propertyConfiguration.RootDirectory))
throw new Exception($"{nameof(propertyConfiguration.RootDirectory)} must have a value and exits!");
throw new ArgumentNullException(nameof(propertyConfiguration.RootDirectory));
}
public void ChangeRootDirectory(string rootDirectory) => _RootDirectory = rootDirectory;