Remove Person Require People File,
PersonContainer and bug fix for GetRightPadded
This commit is contained in:
@ -17,8 +17,6 @@ public class A_Property
|
||||
{
|
||||
|
||||
protected readonly List<string> _ExceptionsDirectories;
|
||||
protected readonly Dictionary<int, int[]> _KeyValuePairs;
|
||||
protected readonly Dictionary<int, int[]> _IndicesFromNew;
|
||||
|
||||
public bool Reverse { get; }
|
||||
public List<string> AngleBracketCollection { get; }
|
||||
@ -34,14 +32,12 @@ public class A_Property
|
||||
private readonly PredictorModel? _PredictorModel;
|
||||
private readonly JsonSerializerOptions _WriteIndentedJsonSerializerOptions;
|
||||
|
||||
public A_Property(int maxDegreeOfParallelism, Configuration configuration, string outputExtension, bool reverse, Model? model, PredictorModel? predictorModel, Dictionary<int, int[]> indicesFromNew, Dictionary<int, int[]> keyValuePairs)
|
||||
public A_Property(int maxDegreeOfParallelism, Configuration configuration, string outputExtension, bool reverse, Model? model, PredictorModel? predictorModel)
|
||||
{
|
||||
_Model = model;
|
||||
Reverse = reverse;
|
||||
_KeyValuePairs = keyValuePairs;
|
||||
_Configuration = configuration;
|
||||
_ExceptionsDirectories = new();
|
||||
_IndicesFromNew = indicesFromNew;
|
||||
_PredictorModel = predictorModel;
|
||||
_OutputExtension = outputExtension;
|
||||
_ASCIIEncoding = new ASCIIEncoding();
|
||||
@ -54,10 +50,6 @@ public class A_Property
|
||||
_VerifyToSeason = configuration.VerifyToSeason.Select(l => Path.Combine(configuration.RootDirectory, l)).ToArray();
|
||||
}
|
||||
|
||||
public A_Property(int maxDegreeOfParallelism, Configuration configuration, string outputExtension, bool reverse, Model? model, PredictorModel? predictorModel) :
|
||||
this(maxDegreeOfParallelism, configuration, outputExtension, reverse, model, predictorModel, new(), new())
|
||||
{ }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||||
@ -144,8 +136,6 @@ public class A_Property
|
||||
}
|
||||
else if (!isIgnoreExtension && isValidImageFormatExtension)
|
||||
{
|
||||
if (populateId && (id is null || !indices.Any()) && !_IndicesFromNew.Any() && !_KeyValuePairs.Any())
|
||||
throw new Exception("May need to move mapLogic constructor! In order to keep six character indices at least one need to have an item!");
|
||||
try
|
||||
{
|
||||
using Image image = Image.FromFile(filteredSourceDirectoryFileHolder.FullName);
|
||||
@ -172,22 +162,13 @@ public class A_Property
|
||||
FileInfo contentFileInfo = new(Path.Combine(angleBracket.Replace("<>", "()"), filteredSourceDirectoryFileHolder.Name));
|
||||
File.WriteAllBytes(Path.ChangeExtension(contentFileInfo.FullName, string.Empty), bytes);
|
||||
}
|
||||
if (_IndicesFromNew.ContainsKey(id.Value) && _IndicesFromNew[id.Value].Any())
|
||||
indices.AddRange(_IndicesFromNew[id.Value]);
|
||||
else
|
||||
{
|
||||
ticks = DateTime.Now.Ticks;
|
||||
string encoding = Encoding.Default.GetString(bytes);
|
||||
if (_MaxDegreeOfParallelism < 2)
|
||||
ticks = LogDelta(ticks, nameof(Encoding.Default.GetString));
|
||||
encodingHash = Shared.Models.Stateless.Methods.IProperty.GetDeterministicHashCode(encoding);
|
||||
if (_MaxDegreeOfParallelism < 2)
|
||||
ticks = LogDelta(ticks, nameof(Shared.Models.Stateless.Methods.IProperty.GetDeterministicHashCode));
|
||||
if (!_KeyValuePairs.ContainsKey(encodingHash))
|
||||
indices.Add(encodingHash);
|
||||
else
|
||||
indices.AddRange(_KeyValuePairs[encodingHash]);
|
||||
}
|
||||
ticks = DateTime.Now.Ticks;
|
||||
string encoding = Encoding.Default.GetString(bytes);
|
||||
if (_MaxDegreeOfParallelism < 2)
|
||||
ticks = LogDelta(ticks, nameof(Encoding.Default.GetString));
|
||||
encodingHash = Shared.Models.Stateless.Methods.IProperty.GetDeterministicHashCode(encoding);
|
||||
if (_MaxDegreeOfParallelism < 2)
|
||||
ticks = LogDelta(ticks, nameof(Shared.Models.Stateless.Methods.IProperty.GetDeterministicHashCode));
|
||||
}
|
||||
width = image.Width;
|
||||
height = image.Height;
|
||||
|
Reference in New Issue
Block a user