IDirectory first pass

This commit is contained in:
2023-01-08 13:33:33 -07:00
parent 9b9573093f
commit 0ef5b668e8
27 changed files with 772 additions and 865 deletions

View File

@ -30,16 +30,14 @@ public class NotCopyCopy
_Log.Information(propertyConfiguration.RootDirectory);
Property.Models.Configuration.Verify(propertyConfiguration, requireExist: true);
Verify(configuration);
bool reverse = false;
string outputExtension = ".jpg";
_Configuration = configuration;
if (!_IsEnvironment.Development)
throw new Exception("This program only allows development environments!");
A_Property propertyLogic = GetPropertyLogic(reverse, outputExtension);
propertyConfiguration.ChangeRootDirectory(configuration.CompareSource);
(_, _, _, Shared.Models.Container[] compareContainers) = Property.Models.Stateless.Container.GetContainers(propertyConfiguration, propertyLogic);
string aPropertySingletonDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(_Configuration.PropertyConfiguration, nameof(A_Property), "{}");
(_, Shared.Models.Container[] compareContainers) = Shared.Models.Stateless.Methods.IContainer.GetContainers(propertyConfiguration, aPropertySingletonDirectory);
propertyConfiguration.ChangeRootDirectory(configuration.SelectedSource);
(_, _, _, Shared.Models.Container[] selectedContainers) = Property.Models.Stateless.Container.GetContainers(propertyConfiguration, propertyLogic);
(_, Shared.Models.Container[] selectedContainers) = Shared.Models.Stateless.Methods.IContainer.GetContainers(propertyConfiguration, aPropertySingletonDirectory);
if (compareContainers.Length == selectedContainers.Length)
throw new Exception();
string directoryName;
@ -100,15 +98,6 @@ public class NotCopyCopy
throw new NullReferenceException(nameof(configuration.SelectedSource));
}
private A_Property GetPropertyLogic(bool reverse, string outputExtension)
{
A_Property result;
if (_Configuration?.PropertyConfiguration is null)
throw new NullReferenceException(nameof(_Configuration.PropertyConfiguration));
result = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, outputExtension, reverse);
return result;
}
private List<(string Source, string[] Destination)> GetCopyCollection(List<Property.Models.DirectoryInfo> compareSourceGroupCollection, List<Property.Models.DirectoryInfo> selectedSourceGroupCollection)
{
List<(string Source, string[] Destination)> results = new();