Refactor file handling and add Log.FileRead implementation
This commit is contained in:
@ -117,43 +117,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
private static int? GetKeyColumnIndex(string[] columns, string keyColumn)
|
||||
{
|
||||
#nullable enable
|
||||
int? result = null;
|
||||
for (int i = 0; i < columns.Length; i++)
|
||||
{
|
||||
if (columns[i] != keyColumn)
|
||||
continue;
|
||||
result = i;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private ReadOnlyCollection<string> GetSystemStateValues(List<string> lines, string[] columns, int keyColumnIndex)
|
||||
{
|
||||
List<string> results = new();
|
||||
string[] values;
|
||||
string? systemState;
|
||||
string keyColumnValue;
|
||||
for (int i = 7; i < lines.Count; i++)
|
||||
{
|
||||
values = lines[i].Split('\t');
|
||||
if (values.Length != columns.Length)
|
||||
continue;
|
||||
keyColumnValue = values[keyColumnIndex];
|
||||
if (string.IsNullOrEmpty(keyColumnValue))
|
||||
continue;
|
||||
if (!_SystemStateToNames.TryGetValue(keyColumnValue, out systemState))
|
||||
continue;
|
||||
if (results.Contains(systemState))
|
||||
continue;
|
||||
results.Add(systemState);
|
||||
}
|
||||
return new(results);
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime _)
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
|
||||
Reference in New Issue
Block a user