187 references to Enable
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
1562var compilationOptions = new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Enable);
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
60.WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
60.WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder.cs (1)
286case NullableContextOptions.Enable:
CommandLine\CSharpCommandLineParser.cs (4)
429Debug.Assert(loweredValue == nameof(NullableContextOptions.Enable).ToLower()); 430nullableContextOptions = NullableContextOptions.Enable; 447nullableContextOptions = NullableContextOptions.Enable; 457nullableContextOptions = NullableContextOptions.Enable;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (40)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
182nullableContextOptions: NullableContextOptions.Enable
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveTests.cs (27)
26[InlineData(NullableContextOptions.Disable, NullableContextOptions.Enable)] 28[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 30[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Enable)] 53[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 54[InlineData(NullableContextOptions.Enable, NullableContextOptions.Warnings)] 55[InlineData(NullableContextOptions.Enable, NullableContextOptions.Enable)] 76[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 78[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Enable)] 79[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 80[InlineData(NullableContextOptions.Enable, NullableContextOptions.Warnings)] 81[InlineData(NullableContextOptions.Enable, NullableContextOptions.Enable)] 104[InlineData(NullableContextOptions.Disable, NullableContextOptions.Enable)] 128var enable = compilationContext != NullableContextOptions.Enable; 170NullableContextOptions.Enable, 193NullableContextOptions.Enable, 222NullableContextOptions.Enable, 250NullableContextOptions.Enable, 278NullableContextOptions.Enable, 308NullableContextOptions.Enable, 338NullableContextOptions.Enable, 369NullableContextOptions.Enable, 398NullableContextOptions.Enable, 428NullableContextOptions.Enable, 459NullableContextOptions.Enable => "disable", 470NullableContextOptions.Enable => "enable",
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveTests.cs (12)
25[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 27[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Enable)] 28[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 29[InlineData(NullableContextOptions.Enable, NullableContextOptions.Warnings)] 30[InlineData(NullableContextOptions.Enable, NullableContextOptions.Enable)] 52NullableContextOptions.Enable, 74NullableContextOptions.Enable, 101NullableContextOptions.Enable, 131NullableContextOptions.Enable, 157NullableContextOptions.Enable, 225NullableContextOptions.Enable => "disable",
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (27)
CommandLineTests.cs (27)
4868Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 4875Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 4883Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 4903Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 4916Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 4924Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 4942Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 4960Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 4964Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 4986Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5000Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5004Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5011Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5018Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5026Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5046Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5053Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5085Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5115Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5126Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5133Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5228Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5232Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5254Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5292Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5296Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions); 5318Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
QuickInfo\SemanticQuickInfoSourceTests.cs (1)
8187await TestWithOptionsAsync(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\EditAndContinue\EditAndContinueTests.cs (1)
259var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable));
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
338nullableContextOptions: NullableContextOptions.Enable);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Attributes\AttributeTests_Nullable.cs (1)
886var comp = CreateCompilation(new[] { source }, options: WithNullable(NullableContextOptions.Enable), parseOptions: TestOptions.Regular8);
Semantics\PatternMatchingTests5.cs (2)
3033var comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(nullableEnable ? NullableContextOptions.Enable : NullableContextOptions.Disable)); 3130var comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(nullableEnable ? NullableContextOptions.Enable : NullableContextOptions.Disable));
Microsoft.CodeAnalysis.CSharp.Features (1)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
90solution = solution.WithProjectCompilationOptions(project.Id, compilationOptions.WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (45)
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (2)
4701compilationOptions = compilationOptions.WithNullableContextOptions(NullableContextOptions.Enable); 4744compilationOptions = compilationOptions.WithNullableContextOptions(NullableContextOptions.Enable);
EnableNullable\EnableNullableTests.cs (3)
37solution = solution.WithProjectCompilationOptions(projectId, compilationOptions.WithNullableContextOptions(NullableContextOptions.Enable)); 53solution = solution.WithProjectCompilationOptions(projectId, compilationOptions.WithNullableContextOptions(NullableContextOptions.Enable)); 538[InlineData(NullableContextOptions.Enable)]
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
182nullableContextOptions: NullableContextOptions.Enable
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveTests.cs (27)
26[InlineData(NullableContextOptions.Disable, NullableContextOptions.Enable)] 28[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 30[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Enable)] 53[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 54[InlineData(NullableContextOptions.Enable, NullableContextOptions.Warnings)] 55[InlineData(NullableContextOptions.Enable, NullableContextOptions.Enable)] 76[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 78[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Enable)] 79[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 80[InlineData(NullableContextOptions.Enable, NullableContextOptions.Warnings)] 81[InlineData(NullableContextOptions.Enable, NullableContextOptions.Enable)] 104[InlineData(NullableContextOptions.Disable, NullableContextOptions.Enable)] 128var enable = compilationContext != NullableContextOptions.Enable; 170NullableContextOptions.Enable, 193NullableContextOptions.Enable, 222NullableContextOptions.Enable, 250NullableContextOptions.Enable, 278NullableContextOptions.Enable, 308NullableContextOptions.Enable, 338NullableContextOptions.Enable, 369NullableContextOptions.Enable, 398NullableContextOptions.Enable, 428NullableContextOptions.Enable, 459NullableContextOptions.Enable => "disable", 470NullableContextOptions.Enable => "enable",
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveTests.cs (12)
25[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 27[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Enable)] 28[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 29[InlineData(NullableContextOptions.Enable, NullableContextOptions.Warnings)] 30[InlineData(NullableContextOptions.Enable, NullableContextOptions.Enable)] 52NullableContextOptions.Enable, 74NullableContextOptions.Enable, 101NullableContextOptions.Enable, 131NullableContextOptions.Enable, 157NullableContextOptions.Enable, 225NullableContextOptions.Enable => "disable",
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (49)
Semantics\NullableContextTests.cs (10)
26[InlineData("#nullable enable", NullableContextOptions.Enable, NullableContext.Enabled)] 31[InlineData("#nullable enable warnings", NullableContextOptions.Enable, NullableContext.Enabled | NullableContext.AnnotationsContextInherited)] 36[InlineData("#nullable enable annotations", NullableContextOptions.Enable, NullableContext.Enabled | NullableContext.WarningsContextInherited)] 41[InlineData("#nullable disable", NullableContextOptions.Enable, NullableContext.Disabled)] 46[InlineData("#nullable disable warnings", NullableContextOptions.Enable, NullableContext.AnnotationsEnabled | NullableContext.AnnotationsContextInherited)] 51[InlineData("#nullable disable annotations", NullableContextOptions.Enable, NullableContext.WarningsEnabled | NullableContext.WarningsContextInherited)] 112Assert.True(NullableContextOptions.Enable.AnnotationsEnabled()); 113Assert.True(NullableContextOptions.Enable.WarningsEnabled()); 503NullableContextOptions.Enable, 1051verify(new[] { source1, source2, source3, source4 }, TestOptions.ReleaseDll.WithNullableContextOptions(NullableContextOptions.Enable), new[] { ".ctor" },
Semantics\NullableReferenceTypesTests.cs (37)
2693var comp = CreateCompilation(source, options: WithNullable(TestOptions.UnsafeReleaseDll, NullableContextOptions.Enable)); 5331var comp = CreateCompilation(source, parseOptions: TestOptions.Regular.WithFeature("run-nullable-analysis", "always"), options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5419comp = CreateCompilation(new[] { source0, source1, source2 }, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5556var comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5576var comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5598var comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5616var comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5638var comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5667var comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5701var comp = CreateCompilation(new[] { source1, source2 }, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5736var comp = CreateCompilation(new[] { source1, source2 }, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable)); 5815.WithNullableContextOptions(NullableContextOptions.Enable) 8589var comp = CreateCompilation("", options: WithNullable(NullableContextOptions.Enable), parseOptions: TestOptions.Regular7_3); 8604comp = CreateCompilation("", options: WithNullable(NullableContextOptions.Enable), parseOptions: TestOptions.Regular8); 8613comp = CreateCompilation(new string[] { }, options: WithNullable(NullableContextOptions.Enable), parseOptions: TestOptions.Regular7_3); 8616comp = CreateCompilation(new string[] { }, options: WithNullable(NullableContextOptions.Enable), parseOptions: TestOptions.Regular8); 32070options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Enable)); 113793AssertGetSpeculativeTypeInfo(source, NullableContextOptions.Enable, type, "A<System.String!>"); 113856AssertGetSpeculativeTypeInfo(source, NullableContextOptions.Enable, type, "A<System.String>"); 113909AssertGetSpeculativeTypeInfo(source, NullableContextOptions.Enable, type, "A<System.String>"); 113965AssertGetSpeculativeTypeInfo(source, NullableContextOptions.Enable, type, "A<System.String!>"); 114018AssertTryGetSpeculativeSemanticModel(source, NullableContextOptions.Enable, type, "A<System.String!>!"); 114082AssertTryGetSpeculativeSemanticModel(source, NullableContextOptions.Enable, type, "A<System.String>"); 114135AssertTryGetSpeculativeSemanticModel(source, NullableContextOptions.Enable, type, "A<System.String>"); 114191AssertTryGetSpeculativeSemanticModel(source, NullableContextOptions.Enable, type, "A<System.String!>!"); 114622assertType(NullableContextOptions.Enable); 114653assertType(NullableContextOptions.Enable); 114683assertType(NullableContextOptions.Enable); 114714assertType(NullableContextOptions.Enable); 114744assertType(NullableContextOptions.Enable); 114773assertType(NullableContextOptions.Enable); 125119assertDiagnosticOptions(NullableContextOptions.Enable); 125303assertDiagnosticOptions(NullableContextOptions.Enable); 125452assertDiagnosticOptions(NullableContextOptions.Enable); 125990assertDiagnosticOptions1(NullableContextOptions.Enable); 126137assertDiagnosticOptions(NullableContextOptions.Enable); 157871var comp = CreateCompilation(src, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Enable));
Semantics\TopLevelStatementsTests.cs (2)
183comp = CreateCompilation(text1, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Enable), parseOptions: DefaultParseOptions); 308comp = CreateCompilation(new[] { text1, text2 }, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Enable), parseOptions: DefaultParseOptions);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\CSharpCompilationOptionsTests.cs (1)
141TestProperty((old, value) => old.WithNullableContextOptions(value), opt => opt.NullableContextOptions, NullableContextOptions.Enable);
Symbols\PartialPropertiesTests.cs (1)
1624var comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable));
Symbols\Source\NullablePublicAPITests.cs (1)
4930var comp = CreateCompilation(code, options: TestOptions.ReleaseExe.WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
779return WithNullable(options, NullableContextOptions.Enable);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
4831.WithProjectCompilationOptions(projectId, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
84new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
84new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
84new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
84new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
84new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Utilities\CSharpCompilationOptionsChangingService.cs (1)
48NullableContextOptions.Enable => "enable",