35 references to InterceptorsNamespaces
Microsoft.CodeAnalysis.CSharp (1)
CSharpParseOptions.cs (1)
196ImmutableArray<ImmutableArray<string>> previewNamespaces = Features.TryGetValue(Feature.InterceptorsNamespaces, out var namespaces) && namespaces.Length > 0
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineTests.cs (4)
12323Assert.Equal("InterceptorsNamespaces", Feature.InterceptorsNamespaces); 12333Assert.Equal("NS1.NS2;NS3.NS4", options.Features[Feature.InterceptorsNamespaces]); 12353Assert.Equal("NS3.NS4", options.Features[Feature.InterceptorsNamespaces]); 12377Assert.False(options.HasFeature(Feature.InterceptorsNamespaces));
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
682var verifier = CompileAndVerify(files.ToArrayAndFree(), parseOptions: TestOptions.Regular.WithFeature(Feature.InterceptorsNamespaces, "global"), expectedOutput: makeExpectedOutput());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
Semantics\InterceptorsTests.cs (28)
36private static readonly CSharpParseOptions RegularWithInterceptors = TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "global"); 37private static readonly CSharpParseOptions RegularPreviewWithInterceptors = TestOptions.RegularPreview.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "global"); 166var comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "NS")); 172comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "NS1.NS2")); 178var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "NS1"), expectedOutput: "1"); 181verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "NS1;NS2"), expectedOutput: "1"); 188test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "NS"), expectedOutput: null, 193test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "NS1.NS2"), expectedOutput: null, 198test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "NS1"), expectedOutput: "1"); 200test(TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "NS1;NS2"), expectedOutput: "1"); 295var comp = CreateCompilation([source, interceptor, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, featureValue)); 304var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, featureValue), expectedOutput: "1"); 332var comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "")); 364var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "global"), expectedOutput: "1"); 367verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "global"), expectedOutput: "1"); 398var comp = CreateCompilation([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "global.A")); 6826var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors")); 6873var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors")); 6926var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors")); 6975var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors")); 7031var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors")); 7079var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors")); 7126var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: featureExists ? TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "") : TestOptions.Regular); 7170var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors;Interceptors")); 7198var comp = CreateCompilation(new[] { source, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors")); 7217var comp = CreateCompilation([], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors")); 7257var comp = CreateCompilation(new[] { source, interceptorSource, s_attributesSource }, parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, @namespace)); 7300var comp = CreateCompilation([source, interceptorSource, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature(CodeAnalysis.Feature.InterceptorsNamespaces, "Interceptors.Nested"));
SourceGeneration\GeneratorDriverTests.cs (1)
4281var parseOptions = TestOptions.RegularPreview.WithFeature(Feature.InterceptorsNamespaces, "global");