Trace logger calls were adde in limit curve calculator

This commit is contained in:
Evgeny Redikultsev
2024-01-21 21:49:41 +05:00
parent b9f13193af
commit 236c7928a0
35 changed files with 280 additions and 91 deletions

View File

@@ -4,6 +4,7 @@ using StructureHelper.Windows.ViewModels.Errors;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Infrastructures.Settings;
using StructureHelperCommon.Models.Loggers;
using StructureHelperCommon.Models.Parameters;
using StructureHelperCommon.Services.Units;
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
@@ -35,6 +36,8 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
public int StepCount => ValidTupleList.Count();
public ITraceLogger? TraceLogger { get; set; }
public CrackDiagramLogic(IEnumerable<IForcesTupleResult> tupleList, IEnumerable<INdmPrimitive> ndmPrimitives)
{
TupleList = tupleList;

View File

@@ -5,6 +5,7 @@ using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Infrastructures.Settings;
using StructureHelperCommon.Models.Calculators;
using StructureHelperCommon.Models.Loggers;
using StructureHelperCommon.Models.Parameters;
using StructureHelperCommon.Models.Shapes;
using StructureHelperCommon.Services.Units;
@@ -40,6 +41,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
public Action<int> SetProgress { get; set; }
public bool Result { get; set; }
public ITraceLogger? TraceLogger { get; set; }
public InteractionDiagramLogic(LimitCurveInputData inputData)
{
@@ -57,8 +59,9 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
var convertLogic = InputData.SurroundData.ConvertLogicEntity;
var calculator = new LimitCurvesCalculator()
{
InputData = InputData
InputData = InputData,
};
if (TraceLogger is not null) { calculator.TraceLogger = TraceLogger; }
calculator.ActionToOutputResults = SetProgressByResult;
SafetyProcessor.RunSafeProcess(() =>
{

View File

@@ -3,6 +3,7 @@ using StructureHelper.Windows.ViewModels.Errors;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Infrastructures.Settings;
using StructureHelperCommon.Models.Loggers;
using StructureHelperCommon.Models.Parameters;
using StructureHelperCommon.Services.Units;
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
@@ -27,6 +28,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
public Action<int> SetProgress { get; set; }
public bool Result { get; set; }
public ITraceLogger? TraceLogger { get; set; }
public void WorkerDoWork(object sender, DoWorkEventArgs e)
{