Complete Class bug fix
This commit is contained in:
@ -66,7 +66,7 @@ internal class SummarySegment
|
||||
return new(results);
|
||||
}
|
||||
|
||||
public static Summary? Get(string[] lines, string site, string summaryLine)
|
||||
public static Summary? Get(ReadOnlyCollection<string> lines, string site, string summaryLine, string lastUnits)
|
||||
{
|
||||
Summary? result;
|
||||
string json;
|
||||
@ -85,10 +85,12 @@ internal class SummarySegment
|
||||
continue;
|
||||
if (line.Contains(site))
|
||||
break;
|
||||
if (line.Contains(lastUnits))
|
||||
break;
|
||||
foreach (JsonProperty jsonProperty in jsonProperties)
|
||||
{
|
||||
segments = line.Split(new string[] { $"{jsonProperty.Name}:", $"{jsonProperty.Name} :" }, StringSplitOptions.None);
|
||||
if (segments.Length < 2 || !line.StartsWith(jsonProperty.Name))
|
||||
if (segments.Length < 2 || (!line.StartsWith(jsonProperty.Name) && !line.StartsWith($"@ {jsonProperty.Name}")))
|
||||
continue;
|
||||
segmentsB = segments[1].Trim().Split(' ');
|
||||
if (segmentsB.Length < 3)
|
||||
@ -119,4 +121,4 @@ internal class SummarySegment
|
||||
[JsonSerializable(typeof(SummarySegment))]
|
||||
internal partial class SummarySegmentSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user