This commit is contained in:
2022-08-22 09:10:19 -07:00
parent f72fcee1db
commit bc2174b17a
150 changed files with 4323 additions and 6259 deletions

View File

@ -19,7 +19,7 @@ public class PropertyCompareLogic
_Configuration = configuration;
_DiffRootDirectory = diffRootDirectory;
_SpellingFindReplace = spellingFindReplace;
_Log = Serilog.Log.ForContext<A_Property>();
_Log = Serilog.Log.ForContext<PropertyCompareLogic>();
_MaxDegreeOfParallelism = Math.Abs(maxDegreeOfParallelism);
}
@ -175,10 +175,10 @@ public class PropertyCompareLogic
else
extension = Path.GetExtension(files[index]);
string json = File.ReadAllText(jsonFile);
A_Property? property = JsonSerializer.Deserialize<A_Property>(json);
Shared.Models.Property? property = JsonSerializer.Deserialize<Shared.Models.Property>(json);
if (property?.Id is null)
throw new NullReferenceException(nameof(property));
DateTime minimumDateTime = Property.Models.Stateless.A_Property.GetMinimumDateTime(property);
DateTime minimumDateTime = Shared.Models.Stateless.Methods.IProperty.GetMinimumDateTime(property);
corrected = string.Concat(relativeDirectory, jsonFileNameWithoutExtension);
if (_SpellingFindReplace is not null && (from l in _SpellingFindReplace where corrected.Contains(l.Find) select true).Any())
{
@ -200,17 +200,17 @@ public class PropertyCompareLogic
2 => property.Id.Value,
3 => property.Id.Value,
4 => property.Id.Value,
5 => Property.Models.Stateless.A_Property.GetDateTime(property).Ticks,
5 => Shared.Models.Stateless.Methods.IProperty.GetDateTime(property).Ticks,
6 => property.CreationTime.Ticks,
7 => property.FileSize,
8 => Property.Models.Stateless.A_Property.GetDateTime(property).Ticks,
8 => Shared.Models.Stateless.Methods.IProperty.GetDateTime(property).Ticks,
9 => property.FileSize,
_ => throw new Exception()
};
s = i switch
{
0 => $"{jsonFileNameWithoutExtension.ToLower()}",
1 => $"{property.FileSize}{Property.Models.Stateless.A_Property.GetDateTime(property).Ticks}",
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,
@ -313,7 +313,7 @@ public class PropertyCompareLogic
}
if (exceptionCount != 0)
throw new Exception();
return (from l in results orderby Property.Models.Stateless.A_Property.GetMinimumDateTime(l.Property).Ticks select l).ToArray();
return (from l in results orderby Shared.Models.Stateless.Methods.IProperty.GetMinimumDateTime(l.Property).Ticks select l).ToArray();
}
private void MoveFiles(string[] directories, List<string[]> fromThenToCollection)