Removed SortContainers

useCeilingAverage as parameter
This commit is contained in:
2023-08-08 21:09:26 -07:00
parent 77f800d1a4
commit b3da09c757
33 changed files with 147 additions and 381 deletions

View File

@ -23,7 +23,6 @@ public class A_Property
private readonly List<string> _AngleBracketCollection;
private readonly IPropertyConfiguration _PropertyConfiguration;
private readonly IReadOnlyDictionary<string, string[]> _FileGroups;
private readonly JsonSerializerOptions _WriteIndentedJsonSerializerOptions;
public A_Property(int maxDegreeOfParallelism, Configuration propertyConfiguration, string outputExtension, bool reverse, string aResultsFullGroupDirectory)
{
@ -36,7 +35,6 @@ public class A_Property
_AngleBracketCollection = new List<string>();
_PropertyConfiguration = propertyConfiguration;
_MaxDegreeOfParallelism = maxDegreeOfParallelism;
_WriteIndentedJsonSerializerOptions = new JsonSerializerOptions { WriteIndented = true };
_FileGroups = Shared.Models.Stateless.Methods.IPath.GetKeyValuePairs(propertyConfiguration, aResultsFullGroupDirectory, new string[] { propertyConfiguration.ResultSingleton });
}
@ -150,7 +148,7 @@ public class A_Property
{
id ??= item.ImageFileHolder.Id;
(_, _, result) = Stateless.Property.GetProperty(populateId, metadata, item.ImageFileHolder, result, isIgnoreExtension, item.IsValidImageFormatExtension, id, _ASCIIEncoding);
json = JsonSerializer.Serialize(result, _WriteIndentedJsonSerializerOptions);
json = JsonSerializer.Serialize(result, PropertyGenerationContext.Default.Property);
if (populateId && Shared.Models.Stateless.Methods.IPath.WriteAllText(fileInfo.FullName, json, updateDateWhenMatches: true, compareBeforeWrite: true))
{
File.SetCreationTime(fileInfo.FullName, result.LastWriteTime);
@ -166,7 +164,7 @@ public class A_Property
}
else if (hasWrongYearProperty)
{
json = JsonSerializer.Serialize(result, _WriteIndentedJsonSerializerOptions);
json = JsonSerializer.Serialize(result, PropertyGenerationContext.Default.Property);
if (Shared.Models.Stateless.Methods.IPath.WriteAllText(fileInfo.FullName, json, updateDateWhenMatches: true, compareBeforeWrite: true))
{
File.SetCreationTime(fileInfo.FullName, result.LastWriteTime);