AppSettings and Configuration changes,

major changes to E_Distance and minor for D_Face
This commit is contained in:
2022-08-19 21:37:36 -07:00
parent 004017b9dd
commit be7a6abbf4
60 changed files with 1269 additions and 1344 deletions

View File

@ -24,8 +24,6 @@ public class NotCopyCopy
if (console is null)
{ }
_AppSettings = appSettings;
if (appSettings.MaxDegreeOfParallelism is null)
throw new NullReferenceException(nameof(appSettings.MaxDegreeOfParallelism));
_IsEnvironment = isEnvironment;
_Log = Serilog.Log.ForContext<NotCopyCopy>();
Property.Models.Configuration propertyConfiguration = Property.Models.Stateless.Configuration.Get(isEnvironment, configurationRoot, workingDirectory);
@ -108,11 +106,9 @@ public class NotCopyCopy
private PropertyLogic GetPropertyLogic(bool reverse, Model? model, PredictorModel? predictorModel)
{
PropertyLogic result;
if (_AppSettings.MaxDegreeOfParallelism is null)
throw new NullReferenceException(nameof(_AppSettings.MaxDegreeOfParallelism));
if (_Configuration?.PropertyConfiguration is null)
throw new NullReferenceException(nameof(_Configuration.PropertyConfiguration));
result = new(_AppSettings.MaxDegreeOfParallelism.Value, _Configuration.PropertyConfiguration, reverse, model, predictorModel);
result = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, reverse, model, predictorModel);
return result;
}