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