Skip to content

Commit

Permalink
Add JsonConstructorAttribute to internal Method() constructor (#1586)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertk committed Jan 16, 2024
1 parent 59b0f9d commit 1981476
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/coverlet.core/CoverageResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
using Coverlet.Core.Enums;
using Coverlet.Core.Instrumentation;

Expand All @@ -22,11 +23,13 @@ internal class Branches : List<BranchInfo> { }

internal class Method
{
[JsonConstructor]
internal Method()
{
Lines = new Lines();
Branches = new Branches();
Lines = [];
Branches = [];
}

public Lines Lines;
public Branches Branches;
}
Expand Down

0 comments on commit 1981476

Please sign in to comment.