70 lines
3.5 KiB
C#
70 lines
3.5 KiB
C#
|
|
|
|
// public class PropertyCompareLogic
|
|
|
|
|
|
// public PropertyCompareLogic(int maxDegreeOfParallelism, Configuration configuration, List<(string Find, string Replace)>? spellingFindReplace = null, string? diffRootDirectory = null)
|
|
|
|
// public override string ToString()
|
|
|
|
// private List<PropertyCompare> GetDuplicates(PropertyCompare[] propertyCompares, int i, PropertyCompare[]? diffPropertyCompares)
|
|
|
|
// private (string[] ToDirectories, List<string[]> FromThenToCollection) Get(string aPropertyCollectionDirectory, PropertyCompare[] propertyCompares, int i, PropertyCompare[]? diffPropertyCompares)
|
|
// else
|
|
// else
|
|
// else
|
|
// else
|
|
|
|
// private void ParallelGet(List<PropertyCompare>? duplicates, List<PropertyCompare> results, List<long> ids, List<PropertyCompare> collection, int loadLessThan, string directory, object @lock, string relativeDirectory, string[] files, List<string> filesWithoutExtension, bool isArg, string jsonFile)
|
|
// else
|
|
// else
|
|
// n = i switch
|
|
// 0 => property.FileId.Value,
|
|
// 1 => property.FileId.Value,
|
|
// 2 => property.FileId.Value,
|
|
// 3 => property.FileId.Value,
|
|
// 4 => property.FileId.Value,
|
|
// 5 => Shared.Models.Stateless.Methods.IProperty.GetDateTime(property).Ticks,
|
|
// 6 => property.CreationTime.Ticks,
|
|
// 7 => property.FileSize,
|
|
// 8 => Shared.Models.Stateless.Methods.IProperty.GetDateTime(property).Ticks,
|
|
// 9 => property.FileSize,
|
|
// _ => throw new Exception()
|
|
// s = i switch
|
|
// 0 => $"{jsonFileNameWithoutExtension.ToLower()}",
|
|
// 1 => $"{property.FileSize}{Shared.Models.Stateless.Methods.IProperty.GetDateTime(property).Ticks}",
|
|
// 2 => $"{property.FileSize}{property.CreationTime:yyyy-MM-dd_HH-mm-ss}",
|
|
// 3 => $"{property.FileSize}{property.Width}{property.Height}",
|
|
// 4 => string.Empty,
|
|
// 5 => $"{property.FileSize}",
|
|
// 6 => $"{property.FileSize}",
|
|
// 7 => $"{property.Width}{property.Height}",
|
|
// 8 => string.Empty,
|
|
// 9 => string.Empty,
|
|
// _ => throw new Exception()
|
|
// lock (@lock)
|
|
// lock (@lock)
|
|
// lock (@lock)
|
|
|
|
// public PropertyCompare[] Get(string aPropertySingletonDirectory, int loadLessThan = 7, List<PropertyCompare>? duplicates = null, bool deleteExtension = false)
|
|
// else
|
|
// else
|
|
// _ = Parallel.For(0, filteredSourceDirectoryFiles.Length, parallelOptions, (i, state) =>
|
|
// try
|
|
// catch (Exception ex)
|
|
|
|
// private void MoveFiles(string[] directories, List<string[]> fromThenToCollection)
|
|
|
|
// public void SaveDiffFiles(string aPropertyCollectionDirectory, int loadLessThan, PropertyCompare[] propertyCompares, PropertyCompare[]? diffPropertyCompares)
|
|
// else
|
|
|
|
// public void SaveLogAndMoveFiles(string aPropertyCollectionDirectory, int loadLessThan, PropertyCompare[] propertyCompares, PropertyCompare[]? diffPropertyCompares, int i)
|
|
// else
|
|
|
|
// public void WithSubdirectory(string propertyDirectory, bool subDirectoriesAny, string fileName, bool renameCompare, bool deleteArg)
|
|
// else
|
|
// else
|
|
// else
|
|
// else
|
|
|