36 references to InterceptorsNamespaces
Microsoft.CodeAnalysis.CSharp (1)
CSharpParseOptions.cs (1)
196
ImmutableArray<ImmutableArray<string>> previewNamespaces = Features.TryGetValue(Feature.
InterceptorsNamespaces
, out var namespaces) && namespaces.Length > 0
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineTests.cs (4)
12398
Assert.Equal("InterceptorsNamespaces", Feature.
InterceptorsNamespaces
);
12408
Assert.Equal("NS1.NS2;NS3.NS4", options.Features[Feature.
InterceptorsNamespaces
]);
12428
Assert.Equal("NS3.NS4", options.Features[Feature.
InterceptorsNamespaces
]);
12452
Assert.False(options.HasFeature(Feature.
InterceptorsNamespaces
));
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (1)
UnsafeEvolutionTests.cs (1)
4722
parseOptions: TestOptions.RegularPreview.WithFeature(Feature.
InterceptorsNamespaces
, "global"),
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
682
var verifier = CompileAndVerify(files.ToArrayAndFree(), parseOptions: TestOptions.Regular.WithFeature(Feature.
InterceptorsNamespaces
, "global"), expectedOutput: makeExpectedOutput());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
Semantics\InterceptorsTests.cs (28)
27
private static readonly CSharpParseOptions RegularWithInterceptors = TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global");
28
private static readonly CSharpParseOptions RegularPreviewWithInterceptors = TestOptions.RegularPreview.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global");
157
var comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS"));
163
comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1.NS2"));
169
var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1"), expectedOutput: "1");
172
verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1;NS2"), expectedOutput: "1");
179
test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS"), expectedOutput: null,
184
test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1.NS2"), expectedOutput: null,
189
test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1"), expectedOutput: "1");
191
test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1;NS2"), expectedOutput: "1");
286
var comp = CreateCompilation([source, interceptor, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, featureValue));
295
var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, featureValue), expectedOutput: "1");
323
var comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, ""));
355
var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global"), expectedOutput: "1");
358
verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global"), expectedOutput: "1");
389
var comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global.A"));
6817
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
6864
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
6917
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
6966
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7022
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7070
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7117
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: featureExists ? TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "") : TestOptions.Regular);
7161
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors;Interceptors"));
7189
var comp = CreateCompilation(new[] { source, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7208
var comp = CreateCompilation([], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7248
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, @namespace));
7291
var comp = CreateCompilation([source, interceptorSource, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors.Nested"));
SourceGeneration\GeneratorDriverTests.cs (1)
4324
var parseOptions = TestOptions.RegularPreview.WithFeature(Feature.
InterceptorsNamespaces
, "global");