Removed E2_Navigate, G_Index, G2_Identify and
NotCopyCopy
This commit is contained in:
@ -22,10 +22,8 @@ public partial class DlibDotNet
|
||||
{
|
||||
|
||||
private readonly D_Face _Faces;
|
||||
private readonly G_Index _Index;
|
||||
private readonly C_Resize _Resize;
|
||||
private readonly F_Random _Random;
|
||||
private readonly E3_Rename _Rename;
|
||||
private readonly IConsole _Console;
|
||||
private readonly E_Distance _Distance;
|
||||
private readonly Serilog.ILogger? _Log;
|
||||
@ -62,9 +60,7 @@ public partial class DlibDotNet
|
||||
Verify(configuration);
|
||||
VerifyExtra(args, propertyConfiguration, configuration);
|
||||
_Configuration = configuration;
|
||||
_Index = new(configuration);
|
||||
_Random = new(configuration);
|
||||
_Rename = new(configuration);
|
||||
if (configuration.IgnoreExtensions is null)
|
||||
throw new NullReferenceException(nameof(configuration.IgnoreExtensions));
|
||||
string propertyRoot = Property.Models.Stateless.IResult.GetResultsGroupDirectory(propertyConfiguration, nameof(A_Property), create: false);
|
||||
@ -121,12 +117,6 @@ public partial class DlibDotNet
|
||||
Storage storage = new(rootDirectory, rootResultsDirectory, peopleRootDirectory);
|
||||
_PersonContainers = Shared.Models.Stateless.Methods.IPersonContainer.GetPersonContainers(storage, configuration.PersonBirthdayFormat, configuration.PersonCharacters.ToArray(), _Faces.FileNameExtension);
|
||||
}
|
||||
if (!isSilent && configuration.TestDistanceResults)
|
||||
{
|
||||
E2_Navigate e2Navigate = new(console, configuration, argZero);
|
||||
e2Navigate.Navigate(propertyConfiguration, configuration.OutputResolutions[0]);
|
||||
_Log.Information(propertyConfiguration.RootDirectory);
|
||||
}
|
||||
{
|
||||
(ImageCodecInfo imageCodecInfo, EncoderParameters encoderParameters, string filenameExtension) = C_Resize.GetTuple(
|
||||
configuration.OutputExtension,
|
||||
@ -144,16 +134,6 @@ public partial class DlibDotNet
|
||||
Search(ticks, argZero, propertyRoot);
|
||||
if (!_PropertyRootExistedBefore && !_IsEnvironment.Development && _Exceptions.Count == 0 && _ArgZeroIsConfigurationRootDirectory)
|
||||
{
|
||||
List<string[]> directoryCollections = _Rename.GetDirectoryRenameCollections(
|
||||
propertyConfiguration,
|
||||
relativePath: string.Empty,
|
||||
newDirectoryName: string.Empty,
|
||||
jsonFiles4InfoAny: false);
|
||||
foreach (string[] directoryCollection in directoryCollections)
|
||||
{
|
||||
_Log.Information(string.Concat("Cleaning <", directoryCollection[0], ">"));
|
||||
_ = Shared.Models.Stateless.Methods.IPath.DeleteEmptyDirectories(directoryCollection[0]);
|
||||
}
|
||||
string d2FacePartsRootDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(propertyConfiguration, nameof(D2_FaceParts));
|
||||
_Log.Information(string.Concat("Cleaning <", d2FacePartsRootDirectory, ">"));
|
||||
_ = Shared.Models.Stateless.Methods.IPath.DeleteEmptyDirectories(d2FacePartsRootDirectory);
|
||||
@ -225,8 +205,6 @@ public partial class DlibDotNet
|
||||
throw new NullReferenceException(nameof(configuration.PredictorModelName));
|
||||
if (string.IsNullOrEmpty(configuration.ModelDirectory) || !Directory.Exists(configuration.ModelDirectory))
|
||||
throw new NullReferenceException(nameof(configuration.ModelDirectory));
|
||||
if (configuration.MappedMaxIndex.HasValue && configuration.LoadOrCreateThenSaveIndex && !_IsEnvironment.DebuggerWasAttachedDuringConstructor)
|
||||
throw new NullReferenceException(nameof(configuration.MappedMaxIndex));
|
||||
}
|
||||
|
||||
private void VerifyExtra(List<string> args, Property.Models.Configuration propertyConfiguration, Models.Configuration configuration)
|
||||
@ -1116,11 +1094,6 @@ public partial class DlibDotNet
|
||||
_Random.Random(_Configuration.PropertyConfiguration, outputResolution, personKeyToIds, mappingCollection);
|
||||
if (_IsEnvironment.Development)
|
||||
continue;
|
||||
G2_Identify identify = new(_Configuration);
|
||||
List<G2_Identify> identifiedCollection = identify.GetIdentifiedCollection(_IsEnvironment, _Configuration.PropertyConfiguration, _Faces.FileNameExtension);
|
||||
identify.WriteAllText(_Configuration.PropertyConfiguration, _Configuration.OutputResolutions[0], identifiedCollection);
|
||||
if (_Configuration.LoadOrCreateThenSaveIndex)
|
||||
_Index.SetIndex(_Configuration.PropertyConfiguration, _Configuration.OutputResolutions[0]);
|
||||
if (!_IsEnvironment.Development)
|
||||
{
|
||||
_ = Shared.Models.Stateless.Methods.IPath.DeleteEmptyDirectories(Path.Combine(aResultsFullGroupDirectory, "{}"));
|
||||
@ -1132,6 +1105,4 @@ public partial class DlibDotNet
|
||||
}
|
||||
}
|
||||
|
||||
internal void RenameQueue() => _Rename.RenameQueue(_Configuration.PropertyConfiguration);
|
||||
|
||||
}
|
Reference in New Issue
Block a user