Record FileRecord "1" {
Record LotRecord "abcd" {
Field a 1{"NONE"}
Field b 2 {2, 3}
Field C 3 {"None", "a", "b"}
Field d 1 {0}
List ClassLookupList {
Columns 3 { int32 CLASSNUMBER, string CLASSNAME, string CLASSCODE }
Data 5{
0 "aa" "";
1 "bb" "";
2 "cc" "";
3 "dd" "";
4 "ee" "";
}
}
Record DataRecord "377" {
Field a 2 {0, 0}
Field b 1 {""}
Field C 7 {"None", "", "", "", "", "", ""}
List DefectList {
Columns 14 { int32 DEFECTID, int32 XREL, int32 YREL, int32 XINDEX, int32 YINDEX, int32 XSIZE, int32 YSIZE, float DEFECTAREA, int32 DSIZE, int32 CLASSNUMBER, int32 TEST, int32 ROUGHBINNUMBER, int32 FINEBINNUMBER, int32 REVIEWSAMPLE }
Data 3{
1 134312000 133394000 0 0 0 0 0.0 758 0 6 0 0 0;
2 150981000 115346000 0 0 0 0 0.0 299 0 6 0 0 0;
3 194310000 137293000 0 0 0 0 0.0 300 0 6 0 0 1; }
}
}
Field FileTimestamp 2 {"09-10-2018", "09:28:46"}
}
EndOfFile;
What I have tried:
using (var reader = new StreamReader(fileName))
{
string line = null;
while ((line = await reader.ReadLineAsync()) != null)
{
if (!string.IsNullOrWhiteSpace(line) || !string.IsNullOrWhiteSpace(line.Split(',')[0]))
{
if (line.Contains("1.8"))
await GetData(reader.ReadLine());
else
return null;
}
}
}
This approach will take lot of coding. Could someone please help me with better approach?