Delete unused Jsonoption
This commit is contained in:
parent
044cf24660
commit
c36ebeeb6a
|
@ -10,28 +10,26 @@ namespace InnovEnergy.App.SaliMax.AggregationService;
|
|||
|
||||
public class AggregatedData
|
||||
{
|
||||
private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true };
|
||||
|
||||
public required Double AvgSoc { get; set; }
|
||||
public required Double AvgPvPower { get; set; }
|
||||
public required Double BatteryPowerAverage { get; set; }
|
||||
|
||||
public void Save(String directory)
|
||||
{
|
||||
var date = DateTime.Now.ToUnixTime();
|
||||
var defaultHDataPath = Environment.CurrentDirectory + "/"+directory+"/";
|
||||
var dataFilePath = defaultHDataPath+date+".csv";
|
||||
var date = DateTime.Now.ToUnixTime();
|
||||
var defaultHDataPath = Environment.CurrentDirectory + "/" + directory + "/";
|
||||
var dataFilePath = defaultHDataPath + date + ".csv";
|
||||
|
||||
if (!Directory.Exists(defaultHDataPath))
|
||||
{
|
||||
Directory.CreateDirectory(defaultHDataPath);
|
||||
Console.WriteLine("Directory created successfully.");
|
||||
}
|
||||
Console.WriteLine("data file path is "+dataFilePath);
|
||||
Console.WriteLine("data file path is " + dataFilePath);
|
||||
|
||||
try
|
||||
{
|
||||
var csvString = Units.ToCsv(this);
|
||||
var csvString = this.ToCsv();
|
||||
File.WriteAllText(dataFilePath, csvString);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
Loading…
Reference in New Issue