Spreading Resistance Profile with ChartJS,
Copy-On-Get and nuget bump (Serilog)
This commit is contained in:
47
Server/Services/json/Setup.cs
Normal file
47
Server/Services/json/Setup.cs
Normal file
@ -0,0 +1,47 @@
|
||||
namespace Adaptation.FileHandlers.json;
|
||||
|
||||
public class Setup
|
||||
{
|
||||
|
||||
public string Finish { get; }
|
||||
public string NorthProbeID { get; }
|
||||
public string SouthProbeID { get; }
|
||||
public string MeasurementPolarity { get; }
|
||||
public double SineBevelAngle { get; }
|
||||
public double ContactRadius { get; }
|
||||
public double ProbeSpacing { get; }
|
||||
public double ProbeLoad { get; }
|
||||
public string Orientation { get; }
|
||||
public int NumberOfStepSizes { get; }
|
||||
public List<Step> Steps { get; }
|
||||
|
||||
internal Setup(csv.Setup setup)
|
||||
{
|
||||
Step step;
|
||||
List<Step> steps = new();
|
||||
Finish = setup.Finish;
|
||||
NorthProbeID = setup.NorthProbeID;
|
||||
SouthProbeID = setup.SouthProbeID;
|
||||
MeasurementPolarity = setup.MeasurementPolarity;
|
||||
SineBevelAngle = double.Parse(setup.SineBevelAngle);
|
||||
ContactRadius = double.Parse(setup.ContactRadius);
|
||||
ProbeSpacing = double.Parse(setup.ProbeSpacing);
|
||||
ProbeLoad = double.Parse(setup.ProbeLoad);
|
||||
Orientation = setup.Orientation;
|
||||
NumberOfStepSizes = int.Parse(setup.NumberOfStepSizes);
|
||||
Steps = steps;
|
||||
foreach (csv.Step csvStep in setup.Steps)
|
||||
{
|
||||
Step step1 = new
|
||||
(
|
||||
number: int.Parse(csvStep.Number),
|
||||
points: int.Parse(csvStep.Points),
|
||||
x: double.Parse(csvStep.X),
|
||||
y: double.Parse(csvStep.Y)
|
||||
);
|
||||
step = step1;
|
||||
steps.Add(step);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user