Skip to content

Commit 36b3164

Browse files
authored
Support profiling Pester with CC using Profiler v3.1 or v4 (#2321)
1 parent 887ccee commit 36b3164

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/csharp/Pester/Tracing/CodeCoverageTracer.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,13 @@ public void Trace(string message, IScriptExtent extent, ScriptBlock _, int __)
102102

103103
lineColumn[key2] = points;
104104
}
105+
106+
#pragma warning disable IDE0060
107+
// Profiler v3.1 compatible overload
108+
public void Trace(IScriptExtent extent, ScriptBlock _, int __) => Trace(null, extent, _, __);
109+
110+
// Profiler v4 compatible overload
111+
public void Trace(IScriptExtent extent, ScriptBlock _, int __, string ___, string ____) => Trace(null, extent, _, __);
112+
#pragma warning restore IDE0060
105113
}
106114
}

0 commit comments

Comments
 (0)