Spreading Resistance Profile with ChartJS,
Copy-On-Get and nuget bump (Serilog)
This commit is contained in:
39
Server/Services/json/LayerHeader.cs
Normal file
39
Server/Services/json/LayerHeader.cs
Normal file
@ -0,0 +1,39 @@
|
||||
namespace Adaptation.FileHandlers.json;
|
||||
|
||||
public class LayerHeader
|
||||
{
|
||||
|
||||
public int NumberOfLayers { get; }
|
||||
public List<Layer> Layers { get; }
|
||||
|
||||
internal LayerHeader(csv.LayerHeader layerHeader)
|
||||
{
|
||||
Layer layer;
|
||||
List<Layer> layers = new();
|
||||
NumberOfLayers = int.Parse(layerHeader.NumberOfLayers);
|
||||
Layers = layers;
|
||||
foreach (csv.Layer csvLayer in layerHeader.Layers)
|
||||
{
|
||||
layer = new
|
||||
(
|
||||
firstPoint: int.Parse(csvLayer.FirstPoint),
|
||||
lastPoint: string.IsNullOrEmpty(csvLayer.LastPoint) ? null : int.Parse(csvLayer.LastPoint),
|
||||
type: csvLayer.Type,
|
||||
smoothing: csvLayer.Smoothing,
|
||||
apply: csvLayer.Apply,
|
||||
sOrder: int.Parse(csvLayer.SOrder),
|
||||
gOrder: int.Parse(csvLayer.GOrder),
|
||||
correction: csvLayer.Correction,
|
||||
conversion: csvLayer.Conversion,
|
||||
junctionOption: csvLayer.JunctionOption,
|
||||
junctionConstant: int.Parse(csvLayer.JunctionConstant),
|
||||
currentDensity: double.Parse(csvLayer.CurrentDensity),
|
||||
m1M2Tolerance: csvLayer.M1M2Tolerance,
|
||||
sheet: csvLayer.Sheet,
|
||||
dose: csvLayer.Dose
|
||||
);
|
||||
layers.Add(layer);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user