37 lines
975 B
C#
37 lines
975 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using SanShared;
|
|
|
|
namespace CSVParser
|
|
{
|
|
public class BlueLight : CSVParser
|
|
{
|
|
public BlueLight(string csvFile) : base(csvFile)
|
|
{
|
|
}
|
|
|
|
public override List<UVcsvStrukture> ReadCSVStrukture()
|
|
{
|
|
List<UVcsvStrukture> result = new List<UVcsvStrukture>();
|
|
DateTime zeit;
|
|
double temperatur;
|
|
double druck;
|
|
int geschwindigkeit;
|
|
|
|
foreach (string partial in Input)
|
|
{
|
|
string[] parts = partial.Split(',');
|
|
string datum = parts[1];
|
|
string uhrzeit = parts[2];
|
|
|
|
if(!DateTime.TryParse(datum + " "+uhrzeit,out zeit))
|
|
throw new Exception("Konnte die datum uhrzeit nicht konventieren");
|
|
}
|
|
return result;
|
|
}
|
|
}
|
|
}
|