Re-write
This commit is contained in:
@ -1,141 +1,103 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace View_by_Distance.TestsWithFaceRecognitionDotNet.Models;
|
||||
namespace View_by_Distance.Tests.Models;
|
||||
|
||||
public class Configuration
|
||||
{
|
||||
|
||||
protected readonly bool? _CheckJsonForDistanceResults;
|
||||
protected readonly int? _CrossDirectoryMaxItemsInDistanceCollection;
|
||||
protected readonly int? _DistanceFactor;
|
||||
protected readonly bool? _ForceMetadataLastWriteTimeToCreationTime;
|
||||
protected readonly bool? _ForceResizeLastWriteTimeToCreationTime;
|
||||
protected readonly string[] _IgnoreExtensions;
|
||||
protected readonly string[] _IgnoreRelativePaths;
|
||||
protected readonly string[] _JuliePhares;
|
||||
protected readonly string[] _LoadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions;
|
||||
protected readonly string[] _LoadOrCreateThenSaveDistanceResultsForOutputResolutions;
|
||||
protected readonly string[] _LoadOrCreateThenSaveImageFacesResultsForOutputResolutions;
|
||||
protected readonly bool? _LoadOrCreateThenSaveIndex;
|
||||
protected readonly int? _LocationConfidenceFactor;
|
||||
protected readonly int? _MappedMaxIndex;
|
||||
protected readonly int? _MaxItemsInDistanceCollection;
|
||||
protected readonly string[] _MixedYearRelativePaths;
|
||||
protected readonly string _ModelDirectory;
|
||||
protected readonly string _ModelName;
|
||||
protected readonly int? _NumberOfJitters;
|
||||
protected readonly int? _NumberOfTimesToUpsample;
|
||||
protected readonly string _OutputExtension;
|
||||
protected readonly int? _OutputQuality;
|
||||
protected readonly string[] _OutputResolutions;
|
||||
protected readonly bool? _OverrideForFaceImages;
|
||||
protected readonly bool? _OverrideForFaceLandmarkImages;
|
||||
protected readonly bool? _OverrideForResizeImages;
|
||||
protected readonly int? _PaddingLoops;
|
||||
protected readonly string _PredictorModelName;
|
||||
protected readonly bool? _PropertiesChangedForDistance;
|
||||
protected readonly bool? _PropertiesChangedForFaces;
|
||||
protected readonly bool? _PropertiesChangedForIndex;
|
||||
protected readonly bool? _PropertiesChangedForMetadata;
|
||||
protected readonly bool? _PropertiesChangedForResize;
|
||||
protected Property.Models.Configuration? _PropertyConfiguration;
|
||||
protected readonly bool? _Reverse;
|
||||
protected readonly string[] _SaveFaceLandmarkForOutputResolutions;
|
||||
protected readonly bool? _SaveFullYearOfRandomFiles;
|
||||
protected readonly bool? _SaveResizedSubfiles;
|
||||
protected readonly string[] _SaveShortcutsForOutputResolutions;
|
||||
protected readonly bool? _SkipSearch;
|
||||
protected readonly bool? _TestDistanceResults;
|
||||
protected readonly string[] _ValidResolutions;
|
||||
public bool? CheckJsonForDistanceResults => _CheckJsonForDistanceResults;
|
||||
public int? CrossDirectoryMaxItemsInDistanceCollection => _CrossDirectoryMaxItemsInDistanceCollection;
|
||||
public int? DistanceFactor => _DistanceFactor;
|
||||
public bool? ForceMetadataLastWriteTimeToCreationTime => _ForceMetadataLastWriteTimeToCreationTime;
|
||||
public bool? ForceResizeLastWriteTimeToCreationTime => _ForceResizeLastWriteTimeToCreationTime;
|
||||
public string[] IgnoreExtensions => _IgnoreExtensions;
|
||||
public string[] IgnoreRelativePaths => _IgnoreRelativePaths;
|
||||
public string[] JuliePhares => _JuliePhares;
|
||||
public string[] LoadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions => _LoadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions;
|
||||
public string[] LoadOrCreateThenSaveDistanceResultsForOutputResolutions => _LoadOrCreateThenSaveDistanceResultsForOutputResolutions;
|
||||
public string[] LoadOrCreateThenSaveImageFacesResultsForOutputResolutions => _LoadOrCreateThenSaveImageFacesResultsForOutputResolutions;
|
||||
public bool? LoadOrCreateThenSaveIndex => _LoadOrCreateThenSaveIndex;
|
||||
public int? LocationConfidenceFactor => _LocationConfidenceFactor;
|
||||
public int? MappedMaxIndex => _MappedMaxIndex;
|
||||
public int? MaxItemsInDistanceCollection => _MaxItemsInDistanceCollection;
|
||||
public string[] MixedYearRelativePaths => _MixedYearRelativePaths;
|
||||
public string ModelDirectory => _ModelDirectory;
|
||||
public string ModelName => _ModelName;
|
||||
public int? NumberOfJitters => _NumberOfJitters;
|
||||
public int? NumberOfTimesToUpsample => _NumberOfTimesToUpsample;
|
||||
public string OutputExtension => _OutputExtension;
|
||||
public int? OutputQuality => _OutputQuality;
|
||||
public string[] OutputResolutions => _OutputResolutions;
|
||||
public bool? OverrideForFaceImages => _OverrideForFaceImages;
|
||||
public bool? OverrideForFaceLandmarkImages => _OverrideForFaceLandmarkImages;
|
||||
public bool? OverrideForResizeImages => _OverrideForResizeImages;
|
||||
public int? PaddingLoops => _PaddingLoops;
|
||||
public string PredictorModelName => _PredictorModelName;
|
||||
public bool? PropertiesChangedForDistance => _PropertiesChangedForDistance;
|
||||
public bool? PropertiesChangedForFaces => _PropertiesChangedForFaces;
|
||||
public bool? PropertiesChangedForIndex => _PropertiesChangedForIndex;
|
||||
public bool? PropertiesChangedForMetadata => _PropertiesChangedForMetadata;
|
||||
public bool? PropertiesChangedForResize => _PropertiesChangedForResize;
|
||||
public Property.Models.Configuration? PropertyConfiguration => _PropertyConfiguration;
|
||||
public bool? Reverse => _Reverse;
|
||||
public string[] SaveFaceLandmarkForOutputResolutions => _SaveFaceLandmarkForOutputResolutions;
|
||||
public bool? SaveFullYearOfRandomFiles => _SaveFullYearOfRandomFiles;
|
||||
public bool? SaveResizedSubfiles => _SaveResizedSubfiles;
|
||||
public string[] SaveShortcutsForOutputResolutions => _SaveShortcutsForOutputResolutions;
|
||||
public bool? SkipSearch => _SkipSearch;
|
||||
public bool? TestDistanceResults => _TestDistanceResults;
|
||||
public string[] ValidResolutions => _ValidResolutions;
|
||||
protected Property.Models.Configuration _PropertyConfiguration;
|
||||
public Property.Models.Configuration PropertyConfiguration => _PropertyConfiguration;
|
||||
|
||||
public bool CheckJsonForDistanceResults { init; get; }
|
||||
public int CrossDirectoryMaxItemsInDistanceCollection { init; get; }
|
||||
public int DistanceFactor { init; get; }
|
||||
public bool ForceFaceLastWriteTimeToCreationTime { init; get; }
|
||||
public bool ForceMetadataLastWriteTimeToCreationTime { init; get; }
|
||||
public bool ForceResizeLastWriteTimeToCreationTime { init; get; }
|
||||
public string[] IgnoreExtensions { init; get; }
|
||||
public string[] IgnoreRelativePaths { init; get; }
|
||||
public string[] JuliePhares { init; get; }
|
||||
public string[] LoadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions { init; get; }
|
||||
public string[] LoadOrCreateThenSaveDistanceResultsForOutputResolutions { init; get; }
|
||||
public string[] LoadOrCreateThenSaveImageFacesResultsForOutputResolutions { init; get; }
|
||||
public bool LoadOrCreateThenSaveIndex { init; get; }
|
||||
public int LocationConfidenceFactor { init; get; }
|
||||
public int? MappedMaxIndex { init; get; }
|
||||
public int MaxItemsInDistanceCollection { init; get; }
|
||||
public string[] MixedYearRelativePaths { init; get; }
|
||||
public string ModelDirectory { init; get; }
|
||||
public string ModelName { init; get; }
|
||||
public int NumberOfJitters { init; get; }
|
||||
public int NumberOfTimesToUpsample { init; get; }
|
||||
public string OutputExtension { init; get; }
|
||||
public int OutputQuality { init; get; }
|
||||
public string[] OutputResolutions { init; get; }
|
||||
public bool OverrideForFaceImages { init; get; }
|
||||
public bool OverrideForFaceLandmarkImages { init; get; }
|
||||
public bool OverrideForResizeImages { init; get; }
|
||||
public int PaddingLoops { init; get; }
|
||||
public string PredictorModelName { init; get; }
|
||||
public bool PropertiesChangedForDistance { init; get; }
|
||||
public bool PropertiesChangedForFaces { init; get; }
|
||||
public bool PropertiesChangedForIndex { init; get; }
|
||||
public bool PropertiesChangedForMetadata { init; get; }
|
||||
public bool PropertiesChangedForResize { init; get; }
|
||||
public bool Reverse { init; get; }
|
||||
public string[] SaveFaceLandmarkForOutputResolutions { init; get; }
|
||||
public bool SaveFullYearOfRandomFiles { init; get; }
|
||||
public bool SaveResizedSubfiles { init; get; }
|
||||
public string[] SaveShortcutsForOutputResolutions { init; get; }
|
||||
public bool SkipSearch { init; get; }
|
||||
public bool TestDistanceResults { init; get; }
|
||||
public string[] ValidResolutions { init; get; }
|
||||
|
||||
[JsonConstructor]
|
||||
public Configuration(bool? checkJsonForDistanceResults, int? crossDirectoryMaxItemsInDistanceCollection, int? distanceFactor, bool? forceMetadataLastWriteTimeToCreationTime, bool? forceResizeLastWriteTimeToCreationTime, string[] ignoreExtensions, string[] ignoreRelativePaths, string[] juliePhares, string[] loadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions, string[] loadOrCreateThenSaveDistanceResultsForOutputResolutions, string[] loadOrCreateThenSaveImageFacesResultsForOutputResolutions, bool? loadOrCreateThenSaveIndex, int? locationConfidenceFactor, int? mappedMaxIndex, int? maxItemsInDistanceCollection, string[] mixedYearRelativePaths, string modelDirectory, string modelName, int? numberOfJitters, int? numberOfTimesToUpsample, string outputExtension, int? outputQuality, string[] outputResolutions, bool? overrideForFaceImages, bool? overrideForFaceLandmarkImages, bool? overrideForResizeImages, int? paddingLoops, string predictorModelName, bool? propertiesChangedForDistance, bool? propertiesChangedForFaces, bool? propertiesChangedForIndex, bool? propertiesChangedForMetadata, bool? propertiesChangedForResize, Property.Models.Configuration? propertyConfiguration, bool? reverse, string[] saveFaceLandmarkForOutputResolutions, bool? saveFullYearOfRandomFiles, bool? saveResizedSubfiles, string[] saveShortcutsForOutputResolutions, bool? skipSearch, bool? testDistanceResults, string[] validResolutions)
|
||||
public Configuration(Property.Models.Configuration propertyConfiguration, bool checkJsonForDistanceResults, int crossDirectoryMaxItemsInDistanceCollection, int distanceFactor, bool forceFaceLastWriteTimeToCreationTime, bool forceMetadataLastWriteTimeToCreationTime, bool forceResizeLastWriteTimeToCreationTime, string[] ignoreExtensions, string[] ignoreRelativePaths, string[] juliePhares, string[] loadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions, string[] loadOrCreateThenSaveDistanceResultsForOutputResolutions, string[] loadOrCreateThenSaveImageFacesResultsForOutputResolutions, bool loadOrCreateThenSaveIndex, int locationConfidenceFactor, int? mappedMaxIndex, int maxItemsInDistanceCollection, string[] mixedYearRelativePaths, string modelDirectory, string modelName, int numberOfJitters, int numberOfTimesToUpsample, string outputExtension, int outputQuality, string[] outputResolutions, bool overrideForFaceImages, bool overrideForFaceLandmarkImages, bool overrideForResizeImages, int paddingLoops, string predictorModelName, bool propertiesChangedForDistance, bool propertiesChangedForFaces, bool propertiesChangedForIndex, bool propertiesChangedForMetadata, bool propertiesChangedForResize, bool reverse, string[] saveFaceLandmarkForOutputResolutions, bool saveFullYearOfRandomFiles, bool saveResizedSubfiles, string[] saveShortcutsForOutputResolutions, bool skipSearch, bool testDistanceResults, string[] validResolutions)
|
||||
{
|
||||
_CheckJsonForDistanceResults = checkJsonForDistanceResults;
|
||||
_CrossDirectoryMaxItemsInDistanceCollection = crossDirectoryMaxItemsInDistanceCollection;
|
||||
_DistanceFactor = distanceFactor;
|
||||
_ForceMetadataLastWriteTimeToCreationTime = forceMetadataLastWriteTimeToCreationTime;
|
||||
_ForceResizeLastWriteTimeToCreationTime = forceResizeLastWriteTimeToCreationTime;
|
||||
_IgnoreExtensions = ignoreExtensions;
|
||||
_IgnoreRelativePaths = ignoreRelativePaths;
|
||||
_JuliePhares = juliePhares;
|
||||
_LoadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions = loadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions;
|
||||
_LoadOrCreateThenSaveDistanceResultsForOutputResolutions = loadOrCreateThenSaveDistanceResultsForOutputResolutions;
|
||||
_LoadOrCreateThenSaveImageFacesResultsForOutputResolutions = loadOrCreateThenSaveImageFacesResultsForOutputResolutions;
|
||||
_LoadOrCreateThenSaveIndex = loadOrCreateThenSaveIndex;
|
||||
_LocationConfidenceFactor = locationConfidenceFactor;
|
||||
_MappedMaxIndex = mappedMaxIndex;
|
||||
_MaxItemsInDistanceCollection = maxItemsInDistanceCollection;
|
||||
_MixedYearRelativePaths = mixedYearRelativePaths;
|
||||
_ModelDirectory = modelDirectory;
|
||||
_ModelName = modelName;
|
||||
_NumberOfJitters = numberOfJitters;
|
||||
_NumberOfTimesToUpsample = numberOfTimesToUpsample;
|
||||
_OutputExtension = outputExtension;
|
||||
_OutputQuality = outputQuality;
|
||||
_OutputResolutions = outputResolutions;
|
||||
_OverrideForFaceImages = overrideForFaceImages;
|
||||
_OverrideForFaceLandmarkImages = overrideForFaceLandmarkImages;
|
||||
_OverrideForResizeImages = overrideForResizeImages;
|
||||
_PaddingLoops = paddingLoops;
|
||||
_PredictorModelName = predictorModelName;
|
||||
_PropertiesChangedForDistance = propertiesChangedForDistance;
|
||||
_PropertiesChangedForFaces = propertiesChangedForFaces;
|
||||
_PropertiesChangedForIndex = propertiesChangedForIndex;
|
||||
_PropertiesChangedForMetadata = propertiesChangedForMetadata;
|
||||
_PropertiesChangedForResize = propertiesChangedForResize;
|
||||
_PropertyConfiguration = propertyConfiguration;
|
||||
_Reverse = reverse;
|
||||
_SaveFaceLandmarkForOutputResolutions = saveFaceLandmarkForOutputResolutions;
|
||||
_SaveFullYearOfRandomFiles = saveFullYearOfRandomFiles;
|
||||
_SaveResizedSubfiles = saveResizedSubfiles;
|
||||
_SaveShortcutsForOutputResolutions = saveShortcutsForOutputResolutions;
|
||||
_SkipSearch = skipSearch;
|
||||
_TestDistanceResults = testDistanceResults;
|
||||
_ValidResolutions = validResolutions;
|
||||
CheckJsonForDistanceResults = checkJsonForDistanceResults;
|
||||
CrossDirectoryMaxItemsInDistanceCollection = crossDirectoryMaxItemsInDistanceCollection;
|
||||
DistanceFactor = distanceFactor;
|
||||
ForceFaceLastWriteTimeToCreationTime = forceFaceLastWriteTimeToCreationTime;
|
||||
ForceMetadataLastWriteTimeToCreationTime = forceMetadataLastWriteTimeToCreationTime;
|
||||
ForceResizeLastWriteTimeToCreationTime = forceResizeLastWriteTimeToCreationTime;
|
||||
IgnoreExtensions = ignoreExtensions;
|
||||
IgnoreRelativePaths = ignoreRelativePaths;
|
||||
JuliePhares = juliePhares;
|
||||
LoadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions = loadOrCreateThenSaveDirectoryDistanceResultsForOutputResolutions;
|
||||
LoadOrCreateThenSaveDistanceResultsForOutputResolutions = loadOrCreateThenSaveDistanceResultsForOutputResolutions;
|
||||
LoadOrCreateThenSaveImageFacesResultsForOutputResolutions = loadOrCreateThenSaveImageFacesResultsForOutputResolutions;
|
||||
LoadOrCreateThenSaveIndex = loadOrCreateThenSaveIndex;
|
||||
LocationConfidenceFactor = locationConfidenceFactor;
|
||||
MappedMaxIndex = mappedMaxIndex;
|
||||
MaxItemsInDistanceCollection = maxItemsInDistanceCollection;
|
||||
MixedYearRelativePaths = mixedYearRelativePaths;
|
||||
ModelDirectory = modelDirectory;
|
||||
ModelName = modelName;
|
||||
NumberOfJitters = numberOfJitters;
|
||||
NumberOfTimesToUpsample = numberOfTimesToUpsample;
|
||||
OutputExtension = outputExtension;
|
||||
OutputQuality = outputQuality;
|
||||
OutputResolutions = outputResolutions;
|
||||
OverrideForFaceImages = overrideForFaceImages;
|
||||
OverrideForFaceLandmarkImages = overrideForFaceLandmarkImages;
|
||||
OverrideForResizeImages = overrideForResizeImages;
|
||||
PaddingLoops = paddingLoops;
|
||||
PredictorModelName = predictorModelName;
|
||||
PropertiesChangedForDistance = propertiesChangedForDistance;
|
||||
PropertiesChangedForFaces = propertiesChangedForFaces;
|
||||
PropertiesChangedForIndex = propertiesChangedForIndex;
|
||||
PropertiesChangedForMetadata = propertiesChangedForMetadata;
|
||||
PropertiesChangedForResize = propertiesChangedForResize;
|
||||
Reverse = reverse;
|
||||
SaveFaceLandmarkForOutputResolutions = saveFaceLandmarkForOutputResolutions;
|
||||
SaveFullYearOfRandomFiles = saveFullYearOfRandomFiles;
|
||||
SaveResizedSubfiles = saveResizedSubfiles;
|
||||
SaveShortcutsForOutputResolutions = saveShortcutsForOutputResolutions;
|
||||
SkipSearch = skipSearch;
|
||||
TestDistanceResults = testDistanceResults;
|
||||
ValidResolutions = validResolutions;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@ -146,6 +108,6 @@ public class Configuration
|
||||
|
||||
public void Set(Property.Models.Configuration configuration) => _PropertyConfiguration = configuration;
|
||||
|
||||
public void Update() => _PropertyConfiguration?.Update();
|
||||
public void Update() => _PropertyConfiguration.Update();
|
||||
|
||||
}
|
Reference in New Issue
Block a user