78 references to Annotations
Microsoft.CodeAnalysis (2)
Compilation\NullableContextOptions.cs (2)
34Enable = Warnings | Annotations, 52IsFlagSet(context, NullableContextOptions.Annotations);
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder.cs (1)
287case NullableContextOptions.Annotations:
CommandLine\CSharpCommandLineParser.cs (2)
437Debug.Assert(loweredValue == nameof(NullableContextOptions.Annotations).ToLower()); 438nullableContextOptions = NullableContextOptions.Annotations;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
132flagToChange = NullableContextOptions.Annotations; 159return NullableContextOptions.Annotations | NullableContextOptions.Warnings;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (21)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveTests.cs (16)
24[InlineData(NullableContextOptions.Disable, NullableContextOptions.Annotations)] 27[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Warnings)] 28[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 29[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Annotations)] 51[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Annotations)] 53[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 75[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Annotations)] 76[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 79[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 102[InlineData(NullableContextOptions.Disable, NullableContextOptions.Annotations)] 105[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Warnings)] 106[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Annotations)] 458NullableContextOptions.Annotations => "disable annotations", 469NullableContextOptions.Annotations => "enable annotations",
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveTests.cs (5)
24[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Annotations)] 25[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 28[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 224NullableContextOptions.Annotations => "disable annotations",
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (8)
CommandLineTests.cs (8)
5272Assert.Equal(NullableContextOptions.Annotations, parsedArgs.CompilationOptions.NullableContextOptions); 5276Assert.Equal(NullableContextOptions.Annotations, parsedArgs.CompilationOptions.NullableContextOptions); 5280Assert.Equal(NullableContextOptions.Annotations, parsedArgs.CompilationOptions.NullableContextOptions); 5284Assert.Equal(NullableContextOptions.Annotations, parsedArgs.CompilationOptions.NullableContextOptions); 5303Assert.Equal(NullableContextOptions.Annotations, parsedArgs.CompilationOptions.NullableContextOptions); 5310Assert.Equal(NullableContextOptions.Annotations, parsedArgs.CompilationOptions.NullableContextOptions); 5322Assert.Equal(NullableContextOptions.Annotations, parsedArgs.CompilationOptions.NullableContextOptions); 5329Assert.Equal(NullableContextOptions.Annotations, parsedArgs.CompilationOptions.NullableContextOptions);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\AttributeTests_Nullable.cs (1)
908var comp = CreateCompilation(new[] { source }, options: WithNullable(NullableContextOptions.Annotations), parseOptions: TestOptions.Regular8);
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (2)
132flagToChange = NullableContextOptions.Annotations; 159return NullableContextOptions.Annotations | NullableContextOptions.Warnings;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (22)
EnableNullable\EnableNullableTests.cs (1)
536[InlineData(NullableContextOptions.Annotations)]
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveTests.cs (16)
24[InlineData(NullableContextOptions.Disable, NullableContextOptions.Annotations)] 27[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Warnings)] 28[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 29[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Annotations)] 51[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Annotations)] 53[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 75[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Annotations)] 76[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 79[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 102[InlineData(NullableContextOptions.Disable, NullableContextOptions.Annotations)] 105[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Warnings)] 106[InlineData(NullableContextOptions.Warnings, NullableContextOptions.Annotations)] 458NullableContextOptions.Annotations => "disable annotations", 469NullableContextOptions.Annotations => "enable annotations",
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveTests.cs (5)
24[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Annotations)] 25[InlineData(NullableContextOptions.Annotations, NullableContextOptions.Enable)] 28[InlineData(NullableContextOptions.Enable, NullableContextOptions.Annotations)] 224NullableContextOptions.Annotations => "disable annotations",
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\NullableContextTests.cs (9)
24[InlineData("#nullable enable", NullableContextOptions.Annotations, NullableContext.Enabled)] 30[InlineData("#nullable enable warnings", NullableContextOptions.Annotations, NullableContext.Enabled | NullableContext.AnnotationsContextInherited)] 35[InlineData("#nullable enable annotations", NullableContextOptions.Annotations, NullableContext.AnnotationsEnabled | NullableContext.WarningsContextInherited)] 39[InlineData("#nullable disable", NullableContextOptions.Annotations, NullableContext.Disabled)] 45[InlineData("#nullable disable warnings", NullableContextOptions.Annotations, NullableContext.AnnotationsEnabled | NullableContext.AnnotationsContextInherited)] 50[InlineData("#nullable disable annotations", NullableContextOptions.Annotations, NullableContext.Disabled | NullableContext.WarningsContextInherited)] 115Assert.True(NullableContextOptions.Annotations.AnnotationsEnabled()); 116Assert.False(NullableContextOptions.Annotations.WarningsEnabled()); 502NullableContextOptions.Annotations,
Semantics\NullableReferenceTypesTests.cs (6)
5954var comp = CreateCompilation(source, options: WithNullable(NullableContextOptions.Annotations)); 123820comp = CreateCompilation(new[] { source }, options: WithNullable(NullableContextOptions.Annotations)); 125305assertDiagnosticOptions(NullableContextOptions.Annotations); 125454assertDiagnosticOptions(NullableContextOptions.Annotations); 125994assertDiagnosticOptions2(NullableContextOptions.Annotations); 126139assertDiagnosticOptions(NullableContextOptions.Annotations);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\PartialPropertiesTests.cs (1)
1639comp = CreateCompilation(source, options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Annotations));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Utilities\CSharpCompilationOptionsChangingService.cs (1)
50NullableContextOptions.Annotations => "annotations",