Base:
property
NullableContextOptions
Microsoft.CodeAnalysis.CompilationOptions.NullableContextOptions
2 writes to NullableContextOptions
Microsoft.CodeAnalysis.CSharp (2)
CSharpCompilationOptions.cs (2)
228this.NullableContextOptions = nullableContextOptions; 410return new CSharpCompilationOptions(this) { NullableContextOptions = options };
35 references to NullableContextOptions
Microsoft.CodeAnalysis.CSharp (18)
Binder\Binder.cs (2)
284switch (Compilation.Options.NullableContextOptions) 295throw ExceptionUtilities.UnexpectedValue(Compilation.Options.NullableContextOptions);
Compilation\CSharpCompilation.cs (6)
258(Options.NullableContextOptions & NullableContextOptions.Warnings) != 0; 2991if (Options.NullableContextOptions != NullableContextOptions.Disable && LanguageVersion < MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion() && 2995nameof(Options.NullableContextOptions), Options.NullableContextOptions, LanguageVersion.ToDisplayString(), 4776if (Options.NullableContextOptions != NullableContextOptions.Disable) 4778writeValue(CompilationOptionNames.Nullable, Options.NullableContextOptions.ToString());
Compilation\CSharpSemanticModel.cs (1)
5465: Compilation.Options.NullableContextOptions;
CSharpCompilationOptions.cs (6)
263nullableContextOptions: other.NullableContextOptions) 405if (options == this.NullableContextOptions) 745this.NullableContextOptions == other.NullableContextOptions); 758Hash.Combine(((uint)TopLevelBinderFlags).GetHashCode(), ((int)this.NullableContextOptions).GetHashCode())))); 766NullableContextOptions,
Errors\MessageProvider.cs (1)
131((CSharpCompilationOptions)options).NullableContextOptions,
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 (3)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
60var defaultNullableContext = compilationOptions.NullableContextOptions;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (2)
105var compilationOptions = ((CSharpCompilationOptions)context.SemanticModel.Compilation.Options).NullableContextOptions; 329(defaultCompleted, options: ((CSharpCompilationOptions)semanticModel.Compilation.Options).NullableContextOptions, cancellationToken));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
42pdbOptions.VerifyPdbOption("nullable", originalOptions.NullableContextOptions);
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
60var defaultNullableContext = compilationOptions.NullableContextOptions;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (2)
105var compilationOptions = ((CSharpCompilationOptions)context.SemanticModel.Compilation.Options).NullableContextOptions; 329(defaultCompleted, options: ((CSharpCompilationOptions)semanticModel.Compilation.Options).NullableContextOptions, cancellationToken));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\NullableReferenceTypesTests.cs (1)
111692string bangOrEmpty = comp0.Options.NullableContextOptions == NullableContextOptions.Disable ? "" : "!";
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\CSharpCompilationOptionsTests.cs (4)
141TestProperty((old, value) => old.WithNullableContextOptions(value), opt => opt.NullableContextOptions, NullableContextOptions.Enable); 454Assert.Equal(NullableContextOptions.Disable, new CSharpCompilationOptions(OutputKind.ConsoleApplication).NullableContextOptions); 462Assert.Equal(values[i], options[i].NullableContextOptions); 472Assert.Equal(values[j], newOptions.NullableContextOptions);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Serialization\CSharpOptionsSerializationService.cs (1)
33writer.WriteByte((byte)csharpOptions.NullableContextOptions);
Microsoft.VisualStudio.LanguageServices.CSharp (4)
Utilities\CSharpCompilationOptionsChangingService.cs (4)
30return oldCSharpOptions.WithAllowUnsafe(newCSharpOptions.AllowUnsafe).WithNullableContextOptions(newCSharpOptions.NullableContextOptions) == newOptions; 44if (newCSharpOptions.NullableContextOptions != oldCSharpOptions.NullableContextOptions) 46var projectSetting = newCSharpOptions.NullableContextOptions switch