106 references to InstrumentationKind
Microsoft.CodeAnalysis (20)
CodeGen\PrivateImplementationDetails.cs (1)
730
/// Synthesized by <see cref="
InstrumentationKind
.ModuleCancellation"/> instrumentation.
Compilation\Compilation.cs (1)
3288
emitOptions.InstrumentationKinds.Contains(
InstrumentationKind
.TestCoverage),
Compilation\DeterministicKeyBuilder.cs (1)
402
foreach (
var
kind in options.InstrumentationKinds)
Emit\EmitOptions.cs (7)
43
public ImmutableArray<
InstrumentationKind
> InstrumentationKinds { get; private set; }
148
instrumentationKinds: ImmutableArray<
InstrumentationKind
>.Empty)
165
ImmutableArray<
InstrumentationKind
> instrumentationKinds)
196
ImmutableArray<
InstrumentationKind
> instrumentationKinds,
229
ImmutableArray<
InstrumentationKind
> instrumentationKinds = default,
339
foreach (
var
instrumentationKind in InstrumentationKinds)
524
public EmitOptions WithInstrumentationKinds(ImmutableArray<
InstrumentationKind
> instrumentationKinds)
Emit\InstrumentationKind.cs (5)
43
internal const
InstrumentationKind
LocalStateTracing = (
InstrumentationKind
)(-1);
45
internal static bool IsValid(this
InstrumentationKind
value)
46
=> value is >=
InstrumentationKind
.None and <=
InstrumentationKind
.ModuleCancellation;
Emit\MethodInstrumentation.cs (2)
16
Kinds = ImmutableArray<
InstrumentationKind
>.Empty,
22
public ImmutableArray<
InstrumentationKind
> Kinds { get; init; }
Emit\SemanticEdit.cs (2)
182
foreach (
var
instrumentationKind in instrumentation.Kinds)
206
internal SemanticEdit(IMethodSymbol oldSymbol, IMethodSymbol newSymbol, ImmutableArray<
InstrumentationKind
> instrumentationKinds)
PEWriter\Members.cs (1)
498
/// Code coverage spans produced by <see cref="
InstrumentationKind
.TestCoverage"/> instrumentation.
Microsoft.CodeAnalysis.CSharp (17)
CommandLine\CSharpCommandLineParser.cs (5)
131
ArrayBuilder<
InstrumentationKind
> instrumentationKinds = ArrayBuilder<
InstrumentationKind
>.GetInstance();
475
foreach (
InstrumentationKind
instrumentationKind in ParseInstrumentationKinds(value, diagnostics))
1998
private static IEnumerable<
InstrumentationKind
> ParseInstrumentationKinds(string value, IList<Diagnostic> diagnostics)
2006
yield return
InstrumentationKind
.TestCoverage;
Compilation\CSharpCompilation.cs (1)
3489
if ((emittingPdb || moduleBeingBuilt.EmitOptions.InstrumentationKinds.Contains(
InstrumentationKind
.TestCoverage)) &&
Compiler\MethodCompiler.cs (6)
354
if (_emittingPdb || instrumentation.Kinds.Contains(
InstrumentationKind
.TestCoverage))
1037
instrumentation.Kinds.Contains(
InstrumentationKind
.TestCoverage) ||
1039
instrumentation.Kinds.Contains(
InstrumentationKind
.StackOverflowProbing) ||
1040
instrumentation.Kinds.Contains(
InstrumentationKind
.ModuleCancellation)))
1043
(instrumentation.Kinds.Contains(
InstrumentationKind
.TestCoverage) || instrumentation.Kinds.Contains(InstrumentationKindExtensions.LocalStateTracing)))
1250
Debug.Assert(!instrumentation.Kinds.Contains(
InstrumentationKind
.TestCoverage));
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (1)
17
/// Implements instrumentation for <see cref="CodeAnalysis.Emit.
InstrumentationKind
.ModuleCancellation"/>.
Lowering\Instrumentation\StackOverflowProbingInstrumenter.cs (1)
13
/// Implements instrumentation for <see cref="CodeAnalysis.Emit.
InstrumentationKind
.StackOverflowProbing"/>.
Lowering\LocalRewriter\LocalRewriter.cs (3)
120
if (instrumentation.Kinds.Contains(
InstrumentationKind
.TestCoverage) &&
127
if (instrumentation.Kinds.Contains(
InstrumentationKind
.StackOverflowProbing) &&
134
if (instrumentation.Kinds.Contains(
InstrumentationKind
.ModuleCancellation) &&
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (13)
CommandLineTests.cs (13)
4000
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray<
InstrumentationKind
>.Empty));
4006
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray<
InstrumentationKind
>.Empty));
4012
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray<
InstrumentationKind
>.Empty));
4018
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray<
InstrumentationKind
>.Empty));
4024
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray<
InstrumentationKind
>.Empty));
4029
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray<
InstrumentationKind
>.Empty));
4034
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray<
InstrumentationKind
>.Empty));
4039
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
4043
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
4047
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
4051
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
4055
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
4059
Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (19)
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.cs (14)
76
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
220
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
340
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
434
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
491
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
530
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
561
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
601
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
669
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
750
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
831
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
925
var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
980
var emitOptions = EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage));
1019
var emitOptions = EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage));
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (5)
2450
ImmutableArray<Diagnostic> diagnostics = CreateEmptyCompilation(source + InstrumentationHelperSource).GetEmitDiagnostics(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
2961
var verifier = CompileAndVerify(c, emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
2997
var verifier = CompileAndVerify(c, emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
3648
emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)),
3663
return base.CompileAndVerify(compilation, expectedOutput: expectedOutput, emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\RuntimeProbing\ModuleCancellationTests.cs (1)
23
private static readonly EmitOptions s_emitOptions = EmitOptions.Default.WithInstrumentationKinds([
InstrumentationKind
.ModuleCancellation]);
Emit\RuntimeProbing\StackOverflowProbingTests.cs (1)
22
private static readonly EmitOptions s_emitOptions = EmitOptions.Default.WithInstrumentationKinds([
InstrumentationKind
.StackOverflowProbing]);
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
DeterministicKeyBuilderTests.cs (1)
511
InstrumentationKind
kind)
Microsoft.CodeAnalysis.Test.Utilities (1)
InstrumentationChecker.cs (1)
322
var peImage = compilation.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)));
Microsoft.CodeAnalysis.UnitTests (5)
Emit\EmitOptionsTests.cs (3)
67
TestProperty((old, value) => old.WithInstrumentationKinds(value), opt => opt.InstrumentationKinds, ImmutableArray.Create(
InstrumentationKind
.TestCoverage));
126
instrumentationKinds: ImmutableArray.Create(
InstrumentationKind
.TestCoverage));
140
instrumentationKinds: ImmutableArray.Create(
InstrumentationKind
.TestCoverage),
Emit\SemanticEditTests.cs (2)
38
var instrumentation = new MethodInstrumentation() { Kinds = ImmutableArray.Create(
InstrumentationKind
.TestCoverage) };
50
instrumentation: new MethodInstrumentation() { Kinds = ImmutableArray.Create((
InstrumentationKind
)123) }));
Microsoft.CodeAnalysis.VisualBasic (8)
CommandLine\VisualBasicCommandLineParser.vb (5)
167
Dim instrumentationKinds As ArrayBuilder(Of
InstrumentationKind
) = ArrayBuilder(Of
InstrumentationKind
).GetInstance()
645
For Each instrumentationKind As
InstrumentationKind
In ParseInstrumentationKinds(value, diagnostics)
2100
Private Shared Iterator Function ParseInstrumentationKinds(value As String, diagnostics As IList(Of Diagnostic)) As IEnumerable(Of
InstrumentationKind
)
2105
Yield
InstrumentationKind
.TestCoverage
Compilation\MethodCompiler.vb (1)
114
If _emittingPdb OrElse instrumentations.Kinds.Contains(
InstrumentationKind
.TestCoverage) Then
Compilation\VisualBasicCompilation.vb (1)
2492
If (emittingPdb OrElse moduleBuilder.EmitOptions.InstrumentationKinds.Contains(
InstrumentationKind
.TestCoverage)) AndAlso
Lowering\Rewriter.vb (1)
51
If(Not isBodySynthesized AndAlso instrumentations.Kinds.Contains(
InstrumentationKind
.TestCoverage),
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (6)
CommandLineTests.vb (6)
894
Assert.True(args.EmitOptions.InstrumentationKinds.SequenceEqual({
InstrumentationKind
.TestCoverage}))
898
Assert.True(args.EmitOptions.InstrumentationKinds.SequenceEqual({
InstrumentationKind
.TestCoverage}))
902
Assert.True(args.EmitOptions.InstrumentationKinds.SequenceEqual({
InstrumentationKind
.TestCoverage}))
906
Assert.True(args.EmitOptions.InstrumentationKinds.SequenceEqual({
InstrumentationKind
.TestCoverage}))
910
Assert.True(args.EmitOptions.InstrumentationKinds.SequenceEqual({
InstrumentationKind
.TestCoverage}))
914
Assert.True(args.EmitOptions.InstrumentationKinds.SequenceEqual({
InstrumentationKind
.TestCoverage}))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (14)
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.vb (8)
76
Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
193
Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
293
Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
361
Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
455
Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
560
Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
650
Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
747
Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
Emit\DynamicAnalysis\DynamicInstrumentationTests.vb (6)
1915
Dim diagnostics As ImmutableArray(Of Diagnostic) = CreateCompilation(source).GetEmitDiagnostics(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
2345
Dim verifier = CompileAndVerify(c, emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
2382
Dim verifier = CompileAndVerify(c, emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
2819
emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
2827
emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)))
2835
emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(
InstrumentationKind
.TestCoverage)),