Update Reader.cs
This commit is contained in:
@@ -31,15 +31,7 @@ namespace BoerseDataConvert
|
||||
string s = reader.ReadLine();
|
||||
if (reader.EndOfStream)
|
||||
{
|
||||
CheckFinalLine(s);
|
||||
EndFile();
|
||||
fileInd++;
|
||||
stopwatch.Start();
|
||||
reader = new StreamReader($@"{adr}/{filesNames[fileInd]}", CodePagesEncodingProvider.Instance.GetEncoding(1252));
|
||||
RecordController.NextFile(filesNames[fileInd]);
|
||||
string date = reader.ReadLine();
|
||||
CheckFirstLine(date);
|
||||
s = reader.ReadLine();
|
||||
s = NextFile(s);
|
||||
}
|
||||
string[] sr = s.Split("|").ToArray();
|
||||
Record record = new Record();
|
||||
@@ -50,6 +42,19 @@ namespace BoerseDataConvert
|
||||
}
|
||||
return record;
|
||||
}
|
||||
private string NextFile(string s)
|
||||
{
|
||||
CheckFinalLine(s);
|
||||
EndFile();
|
||||
fileInd++;
|
||||
stopwatch.Start();
|
||||
reader = new StreamReader($@"{adr}/{filesNames[fileInd]}", CodePagesEncodingProvider.Instance.GetEncoding(1252));
|
||||
RecordController.NextFile(filesNames[fileInd]);
|
||||
string date = reader.ReadLine();
|
||||
CheckFirstLine(date);
|
||||
s = reader.ReadLine();
|
||||
return s;
|
||||
}
|
||||
private void CheckFirstLine(string date)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user