35 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)
12323
Assert.Equal("InterceptorsNamespaces", Feature.
InterceptorsNamespaces
);
12333
Assert.Equal("NS1.NS2;NS3.NS4", options.Features[Feature.
InterceptorsNamespaces
]);
12353
Assert.Equal("NS3.NS4", options.Features[Feature.
InterceptorsNamespaces
]);
12377
Assert.False(options.HasFeature(Feature.
InterceptorsNamespaces
));
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)
36
private static readonly CSharpParseOptions RegularWithInterceptors = TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global");
37
private static readonly CSharpParseOptions RegularPreviewWithInterceptors = TestOptions.RegularPreview.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global");
166
var comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS"));
172
comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1.NS2"));
178
var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1"), expectedOutput: "1");
181
verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1;NS2"), expectedOutput: "1");
188
test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS"), expectedOutput: null,
193
test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1.NS2"), expectedOutput: null,
198
test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1"), expectedOutput: "1");
200
test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "NS1;NS2"), expectedOutput: "1");
295
var comp = CreateCompilation([source, interceptor, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, featureValue));
304
var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, featureValue), expectedOutput: "1");
332
var comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, ""));
364
var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global"), expectedOutput: "1");
367
verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global"), expectedOutput: "1");
398
var comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "global.A"));
6826
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
6873
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
6926
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
6975
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7031
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7079
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7126
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: featureExists ? TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "") : TestOptions.Regular);
7170
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors;Interceptors"));
7198
var comp = CreateCompilation(new[] { source, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7217
var comp = CreateCompilation([], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors"));
7257
var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, @namespace));
7300
var comp = CreateCompilation([source, interceptorSource, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.
InterceptorsNamespaces
, "Interceptors.Nested"));
SourceGeneration\GeneratorDriverTests.cs (1)
4281
var parseOptions = TestOptions.RegularPreview.WithFeature(Feature.
InterceptorsNamespaces
, "global");