Spreading Resistance Profile with ChartJS,
Copy-On-Get and nuget bump (Serilog)
This commit is contained in:
31
Server/Services/json/RawData.cs
Normal file
31
Server/Services/json/RawData.cs
Normal file
@ -0,0 +1,31 @@
|
||||
namespace Adaptation.FileHandlers.json;
|
||||
|
||||
public class RawData
|
||||
{
|
||||
|
||||
public int TotalPoints { get; }
|
||||
public List<Point> Points { get; }
|
||||
|
||||
internal RawData(csv.RawData rawData)
|
||||
{
|
||||
Point point;
|
||||
List<Point> points = new();
|
||||
TotalPoints = int.Parse(rawData.TotalPoints);
|
||||
Points = points;
|
||||
foreach (csv.Point csvPoint in rawData.Points)
|
||||
{
|
||||
point = new
|
||||
(
|
||||
number: double.Parse(csvPoint.Number),
|
||||
depth: double.Parse(csvPoint.Depth),
|
||||
resistance: double.Parse(csvPoint.Resistance),
|
||||
stageX: double.Parse(csvPoint.StageX),
|
||||
stageY: double.Parse(csvPoint.StageY),
|
||||
stageZ: double.Parse(csvPoint.StageZ),
|
||||
stageT: double.Parse(csvPoint.StageT)
|
||||
);
|
||||
points.Add(point);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user