70 references to MaybeNull
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
StaticRouteHandlerModel\Emitters\EndpointJsonPreparationEmitter.cs (1)
19codeWriter.WriteLine($"var responseJsonTypeInfo = (JsonTypeInfo<{responseType.ToDisplayString(NullableFlowState.MaybeNull, EmitterConstants.DisplayFormat)}>)jsonSerializerOptions.GetTypeInfo(typeof({typeName}));");
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (1)
41return type.ToDisplayString(isOptional ? NullableFlowState.MaybeNull : NullableFlowState.NotNull, EmitterConstants.DisplayFormat);
Microsoft.CodeAnalysis (1)
Symbols\NullableFlowState.cs (1)
39case CodeAnalysis.NullableFlowState.MaybeNull:
Microsoft.CodeAnalysis.CSharp (5)
BoundTree\BoundNode.cs (2)
255case CodeAnalysis.NullableFlowState.MaybeNull: 290var flowState = (_attributes & BoundNodeAttributes.TopLevelFlowStateMaybeNull) == 0 ? CodeAnalysis.NullableFlowState.NotNull : CodeAnalysis.NullableFlowState.MaybeNull;
Symbols\NullableFlowStateExtensions.cs (3)
33CSharp.NullableFlowState.MaybeNull => CodeAnalysis.NullableFlowState.MaybeNull, 34CSharp.NullableFlowState.MaybeDefault => CodeAnalysis.NullableFlowState.MaybeNull, 44CodeAnalysis.NullableFlowState.MaybeNull => CSharp.NullableFlowState.MaybeNull,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (1)
84if (typeInfo.Nullability.FlowState == NullableFlowState.MaybeNull)
Microsoft.CodeAnalysis.CSharp.Features (1)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
760if (returnTypeInfo.Nullability.FlowState == NullableFlowState.MaybeNull)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (33)
Semantics\DynamicTests.cs (8)
6741Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 6850Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 6961Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 7123Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 8353Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 8462Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 8571Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 8682Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState);
Semantics\NullableContextTests.cs (13)
392var expectedNullability = expectedFlowState ? Microsoft.CodeAnalysis.NullableFlowState.MaybeNull : Microsoft.CodeAnalysis.NullableFlowState.None; 427var expectedNullability = expectedFlowState ? Microsoft.CodeAnalysis.NullableFlowState.MaybeNull : Microsoft.CodeAnalysis.NullableFlowState.None; 1776Assert.Equal(Microsoft.CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 1804verify(source, Microsoft.CodeAnalysis.NullableFlowState.MaybeNull, ".ctor"); 1818verify(source, Microsoft.CodeAnalysis.NullableFlowState.MaybeNull, ".ctor"); 1832verify(source, Microsoft.CodeAnalysis.NullableFlowState.MaybeNull, ".ctor"); 1880verify(attributeArguments[0], "A.F1 = null", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 1929verify(attributeArguments[0], "C1", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 1971verify(equalsValueClauses[0], "(F1 = null)", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 2012verify(declarations[1], "F2", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 2013verify(declarations[2], "F3", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 2051verify(declarations[1], "P2", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 2052verify(declarations[2], "P3", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull);
Semantics\NullableReferenceTypesTests.cs (10)
56080Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(nullNode).ConvertedNullability.FlowState); 56110Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(nullNode).ConvertedNullability.FlowState); 56143Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(defaultNode).ConvertedNullability.FlowState); 56308Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(nullNode).ConvertedNullability.FlowState); 126856var inputs = new[] { NullableFlowState.NotNull, NullableFlowState.MaybeNull }; 126862{ NullableFlowState.NotNull, NullableFlowState.MaybeNull }, 126863{ NullableFlowState.MaybeNull, NullableFlowState.MaybeNull }, 126888var inputs = new[] { NullableFlowState.NotNull, NullableFlowState.MaybeNull }; 126894{ NullableFlowState.NotNull, NullableFlowState.MaybeNull },
Semantics\TopLevelStatementsTests.cs (2)
1523Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model1.GetTypeInfo(reference).Nullability.FlowState); 1526Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model1.GetTypeInfo(reference).Nullability.FlowState);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (24)
Compilation\TypeInfoTests.cs (1)
23var nullable = new NullabilityInfo(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableFlowState.MaybeNull);
Symbols\Source\NullablePublicAPITests.cs (23)
1216var nullable = new NullabilityInfo(PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 1266var @null = new NullabilityInfo(PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 1376verifySpeculativeModel(ifStatement.SpanStart, PublicNullableFlowState.MaybeNull); 1382verifySpeculativeModel(conditionalAccessExpression.SpanStart, PublicNullableFlowState.MaybeNull); 1388verifySpeculativeModel(ternary.WhenTrue.SpanStart, PublicNullableFlowState.MaybeNull); 1520verifySpeculativeTypeInfo(ifStatement.SpanStart, PublicNullableFlowState.MaybeNull); 1523verifySpeculativeTypeInfo(conditionalAccessExpression.SpanStart, PublicNullableFlowState.MaybeNull); 1526verifySpeculativeTypeInfo(ternary.WhenTrue.SpanStart, PublicNullableFlowState.MaybeNull); 1576verifySpeculativeTypeInfo(ifStatement.SpanStart, PublicNullableFlowState.MaybeNull); 1579verifySpeculativeTypeInfo(conditionalAccessExpression.SpanStart, PublicNullableFlowState.MaybeNull); 1582verifySpeculativeTypeInfo(ternary.WhenTrue.SpanStart, PublicNullableFlowState.MaybeNull); 1630Assert.Equal(PublicNullableFlowState.MaybeNull, type.Nullability.FlowState); 1796Assert.Equal(PublicNullableFlowState.MaybeNull, info.Nullability.FlowState); 1953Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 1954Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.ConvertedNullability.FlowState); 2297Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 2567Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 2568Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.ConvertedNullability.FlowState); 2921Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 4273Assert.Equal(PublicNullableFlowState.MaybeNull, model.GetTypeInfo(default0).Nullability.FlowState); 4307Assert.Equal(PublicNullableFlowState.MaybeNull, model.GetTypeInfo(default0).Nullability.FlowState); 4336verify(exprs[0], PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 4337verify(exprs[1], PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (1)
84if (typeInfo.Nullability.FlowState == NullableFlowState.MaybeNull)
Microsoft.CodeAnalysis.Features (1)
QuickInfo\QuickInfoUtilities.cs (1)
139NullableFlowState.MaybeNull => string.Format(FeaturesResources._0_may_be_null_here, symbol.Name),
Microsoft.CodeAnalysis.UnitTests (1)
Symbols\NullabilityInfoTests.cs (1)
27assertEqualsAndHashCode(new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.MaybeNull),