152 references to Disable
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
315.WithNullableContextOptions(NullableContextOptions.Disable);
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
315.WithNullableContextOptions(NullableContextOptions.Disable);
Microsoft.CodeAnalysis.CSharp (14)
Binder\Binder.cs (1)
290case NullableContextOptions.Disable:
CommandLine\CSharpCommandLineParser.cs (5)
67NullableContextOptions nullableContextOptions = NullableContextOptions.Disable; 425Debug.Assert(loweredValue == nameof(NullableContextOptions.Disable).ToLower()); 426nullableContextOptions = NullableContextOptions.Disable; 464nullableContextOptions = NullableContextOptions.Disable; 1536if (nullableContextOptions != NullableContextOptions.Disable && parseOptions.LanguageVersion < MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion())
Compilation\CSharpCompilation.cs (2)
2991if (Options.NullableContextOptions != NullableContextOptions.Disable && LanguageVersion < MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion() && 4776if (Options.NullableContextOptions != NullableContextOptions.Disable)
Compilation\CSharpSemanticModel.cs (1)
5464? NullableContextOptions.Disable
CSharpCompilationOptions.cs (3)
75NullableContextOptions nullableContextOptions = NullableContextOptions.Disable) 137nullableContextOptions: NullableContextOptions.Disable) 939nullableContextOptions: NullableContextOptions.Disable)
FlowAnalysis\NullableWalker.cs (1)
1611if (compilation.Options.NullableContextOptions != NullableContextOptions.Disable)
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
251bool value = (compilation.Options.NullableContextOptions != NullableContextOptions.Disable) ||
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
62? NullableContextOptions.Disable 163return NullableContextOptions.Disable;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (8)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveTests.cs (6)
24[InlineData(NullableContextOptions.Disable, NullableContextOptions.Annotations)] 25[InlineData(NullableContextOptions.Disable, NullableContextOptions.Warnings)] 26[InlineData(NullableContextOptions.Disable, NullableContextOptions.Enable)] 102[InlineData(NullableContextOptions.Disable, NullableContextOptions.Annotations)] 103[InlineData(NullableContextOptions.Disable, NullableContextOptions.Warnings)] 104[InlineData(NullableContextOptions.Disable, NullableContextOptions.Enable)]
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveTests.cs (2)
181NullableContextOptions.Disable, 216await VerifyCodeFixAsync(NullableContextOptions.Disable, code, code);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (38)
CommandLineTests.cs (38)
4864Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4879Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4890Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4897Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4907Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4920Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4931Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4938Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4946Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4956Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4971Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4978Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4982Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 4996Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5022Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5039Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5062Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5071Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5078Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5094Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5101Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5108Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5119Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5137Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5144Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5148Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5152Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5159Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5166Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5173Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5180Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5187Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5194Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5201Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5224Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5250Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5288Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions); 5314Assert.Equal(NullableContextOptions.Disable, parsedArgs.CompilationOptions.NullableContextOptions);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
341yield return defaultOptions.WithNullableContextOptions(NullableContextOptions.Disable);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (17)
Semantics\PatternMatchingTests3.cs (15)
593var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 636var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 679var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 722var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 746var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 769var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 812var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 854var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 902var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 961var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 989var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 1036var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 1089var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 1142var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable)); 1195var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithNullableContextOptions(NullableContextOptions.Disable));
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 (3)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
65CompilationOptions.NullableContextOptions: NullableContextOptions.Disable,
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
62? NullableContextOptions.Disable 163return NullableContextOptions.Disable;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (8)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveTests.cs (6)
24[InlineData(NullableContextOptions.Disable, NullableContextOptions.Annotations)] 25[InlineData(NullableContextOptions.Disable, NullableContextOptions.Warnings)] 26[InlineData(NullableContextOptions.Disable, NullableContextOptions.Enable)] 102[InlineData(NullableContextOptions.Disable, NullableContextOptions.Annotations)] 103[InlineData(NullableContextOptions.Disable, NullableContextOptions.Warnings)] 104[InlineData(NullableContextOptions.Disable, NullableContextOptions.Enable)]
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveTests.cs (2)
181NullableContextOptions.Disable, 216await VerifyCodeFixAsync(NullableContextOptions.Disable, code, code);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (52)
Semantics\NullableContextTests.cs (10)
23[InlineData("#nullable enable", NullableContextOptions.Disable, NullableContext.Enabled)] 28[InlineData("#nullable enable warnings", NullableContextOptions.Disable, NullableContext.WarningsEnabled | NullableContext.AnnotationsContextInherited)] 33[InlineData("#nullable enable annotations", NullableContextOptions.Disable, NullableContext.AnnotationsEnabled | NullableContext.WarningsContextInherited)] 38[InlineData("#nullable disable", NullableContextOptions.Disable, NullableContext.Disabled)] 43[InlineData("#nullable disable warnings", NullableContextOptions.Disable, NullableContext.Disabled | NullableContext.AnnotationsContextInherited)] 48[InlineData("#nullable disable annotations", NullableContextOptions.Disable, NullableContext.Disabled | NullableContext.WarningsContextInherited)] 121Assert.False(NullableContextOptions.Disable.AnnotationsEnabled()); 122Assert.False(NullableContextOptions.Disable.WarningsEnabled()); 482NullableContextOptions.Disable, 1023var options = TestOptions.ReleaseDll.WithNullableContextOptions(NullableContextOptions.Disable);
Semantics\NullableReferenceTypesTests.cs (41)
5285var comp = CreateCompilation(source, parseOptions: TestOptions.Regular.WithFeature("run-nullable-analysis", "always"), options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Disable)); 5406comp = CreateCompilation(new[] { source0, source1, source2 }, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Disable)); 8601comp = CreateCompilation("", options: WithNullable(NullableContextOptions.Disable), parseOptions: TestOptions.Regular7_3); 8610comp = CreateCompilation("", options: WithNullable(NullableContextOptions.Disable), parseOptions: TestOptions.Regular8); 8625comp = CreateCompilation(new string[] { }, options: WithNullable(NullableContextOptions.Disable), parseOptions: TestOptions.Regular7_3); 8628comp = CreateCompilation(new string[] { }, options: WithNullable(NullableContextOptions.Disable), parseOptions: TestOptions.Regular8); 111692string bangOrEmpty = comp0.Options.NullableContextOptions == NullableContextOptions.Disable ? "" : "!"; 113222assertNonNullTypesContext(source1, NullableContextOptions.Disable); 113225assertNonNullTypesContext(source2, NullableContextOptions.Disable); 113288assertNonNullTypesContext(source1, NullableContextOptions.Disable); 113291assertNonNullTypesContext(source2, NullableContextOptions.Disable); 113360assertNonNullTypesContext(source1, NullableContextOptions.Disable); 113363assertNonNullTypesContext(source2, NullableContextOptions.Disable); 113415assertNonNullTypesContext(NullableContextOptions.Disable); 113470assertNonNullTypesContext(NullableContextOptions.Disable); 113525assertNonNullTypesContext(NullableContextOptions.Disable); 113583assertNonNullTypesContext(NullableContextOptions.Disable); 113641assertNonNullTypesContext(NullableContextOptions.Disable); 113684assertNonNullTypesContext(NullableContextOptions.Disable); 113739assertNonNullTypesContext(NullableContextOptions.Disable); 113830AssertGetSpeculativeTypeInfo(source, NullableContextOptions.Disable, type, "A<System.String>"); 113881AssertGetSpeculativeTypeInfo(source, NullableContextOptions.Disable, type, "A<System.String!>"); 113936AssertGetSpeculativeTypeInfo(source, NullableContextOptions.Disable, type, "A<System.String!>"); 113993AssertGetSpeculativeTypeInfo(source, NullableContextOptions.Disable, type, "A<System.String>"); 114056AssertTryGetSpeculativeSemanticModel(source, NullableContextOptions.Disable, type, "A<System.String>"); 114107AssertTryGetSpeculativeSemanticModel(source, NullableContextOptions.Disable, type, "A<System.String!>!"); 114162AssertTryGetSpeculativeSemanticModel(source, NullableContextOptions.Disable, type, "A<System.String!>!"); 114219AssertTryGetSpeculativeSemanticModel(source, NullableContextOptions.Disable, type, "A<System.String>"); 114241assertNonNullTypesContext(NullableContextOptions.Disable); 114299assertNonNullTypesContext(NullableContextOptions.Disable); 114360assertNonNullTypesContext(NullableContextOptions.Disable); 114418assertNonNullTypesContext(NullableContextOptions.Disable); 114454assertNonNullTypesContext(NullableContextOptions.Disable); 114491assertNonNullTypesContext(NullableContextOptions.Disable); 114527assertNonNullTypesContext(NullableContextOptions.Disable); 114557assertNonNullTypesContext(NullableContextOptions.Disable); 114589assertNonNullTypesContext(NullableContextOptions.Disable); 125302assertDiagnosticOptions(NullableContextOptions.Disable); 125451assertDiagnosticOptions(NullableContextOptions.Disable); 125993assertDiagnosticOptions2(NullableContextOptions.Disable); 126136assertDiagnosticOptions(NullableContextOptions.Disable);
Semantics\SemanticErrorTests.cs (1)
22592CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }, options: TestOptions.ReleaseDll.WithNullableContextOptions(NullableContextOptions.Disable)).VerifyDiagnostics(
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\CSharpCompilationOptionsTests.cs (2)
415NullableContextOptions nullableContextOptions = NullableContextOptions.Disable; 454Assert.Equal(NullableContextOptions.Disable, new CSharpCompilationOptions(OutputKind.ConsoleApplication).NullableContextOptions);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
784return WithNullable(options, NullableContextOptions.Disable);
Microsoft.CodeAnalysis.Rebuild (1)
CSharpCompilationFactory.cs (1)
83? NullableContextOptions.Disable
Microsoft.CodeAnalysis.VisualBasic (1)
VisualBasicCompilationOptions.vb (1)
1381Return NullableContextOptions.Disable
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace_XmlConsumption.cs (1)
417var nullable = NullableContextOptions.Disable;
Workspaces\TestWorkspace_XmlCreation.cs (1)
178if (options.NullableContextOptions != NullableContextOptions.Disable)