108 references to NotNull
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (1)
41
return type.ToDisplayString(isOptional ? NullableFlowState.MaybeNull : NullableFlowState.
NotNull
, EmitterConstants.DisplayFormat);
Microsoft.CodeAnalysis (1)
Symbols\NullableFlowState.cs (1)
41
case CodeAnalysis.NullableFlowState.
NotNull
:
Microsoft.CodeAnalysis.CSharp (6)
BoundTree\BoundNode.cs (2)
259
case CodeAnalysis.NullableFlowState.
NotNull
:
290
var flowState = (_attributes & BoundNodeAttributes.TopLevelFlowStateMaybeNull) == 0 ? CodeAnalysis.NullableFlowState.
NotNull
: CodeAnalysis.NullableFlowState.MaybeNull;
Compilation\CSharpSemanticModel.cs (2)
2100
convertedNullability = new NullabilityInfo(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableFlowState.
NotNull
);
2251
nullability = new NullabilityInfo(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableFlowState.
NotNull
);
Symbols\NullableFlowStateExtensions.cs (2)
32
CSharp.NullableFlowState.NotNull => CodeAnalysis.NullableFlowState.
NotNull
,
43
CodeAnalysis.NullableFlowState.
NotNull
=> CSharp.NullableFlowState.NotNull,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (68)
Semantics\DynamicTests.cs (57)
4983
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
5064
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
5107
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
5187
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
5230
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
5311
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
6029
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
6109
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
6152
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
6232
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
6272
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
6352
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
6678
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
6787
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
6897
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7066
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7169
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7235
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7282
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7351
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7398
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7468
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7588
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7647
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7693
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7753
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7799
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7859
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
7974
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8034
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8080
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8140
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8185
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8244
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8290
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8399
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8508
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8618
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
8868
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10020
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10097
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10148
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10225
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10276
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10353
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10430
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10505
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10564
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10652
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10712
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10802
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
10982
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
11068
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
11324
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
11377
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
11591
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
11643
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
Semantics\NullableContextTests.cs (1)
353
var expectedNullability = expectedFlowState ? Microsoft.CodeAnalysis.NullableFlowState.
NotNull
: Microsoft.CodeAnalysis.NullableFlowState.None;
Semantics\NullableReferenceTypesTests.cs (10)
56180
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, model.GetTypeInfo(defaultNode).ConvertedNullability.FlowState);
62846
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
126856
var inputs = new[] { NullableFlowState.
NotNull
, NullableFlowState.MaybeNull };
126862
{ NullableFlowState.
NotNull
, NullableFlowState.MaybeNull },
126888
var inputs = new[] { NullableFlowState.
NotNull
, NullableFlowState.MaybeNull };
126893
{ NullableFlowState.
NotNull
, NullableFlowState.
NotNull
},
126894
{ NullableFlowState.
NotNull
, NullableFlowState.MaybeNull },
161253
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
161299
Assert.Equal(CodeAnalysis.NullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (26)
Compilation\TypeInfoTests.cs (1)
22
var notNullable = new NullabilityInfo(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableFlowState.
NotNull
);
Symbols\Source\NullablePublicAPITests.cs (25)
1098
Assert.Equal(PublicNullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
1217
var notNullable = new NullabilityInfo(PublicNullableAnnotation.NotAnnotated, PublicNullableFlowState.
NotNull
);
1265
var notNull = new NullabilityInfo(PublicNullableAnnotation.NotAnnotated, PublicNullableFlowState.
NotNull
);
1379
verifySpeculativeModel(ifStatement.Statement.SpanStart, PublicNullableFlowState.
NotNull
);
1385
verifySpeculativeModel(conditionalAccessExpression.WhenNotNull.SpanStart, PublicNullableFlowState.
NotNull
);
1391
verifySpeculativeModel(ternary.WhenFalse.SpanStart, PublicNullableFlowState.
NotNull
);
1401
Assert.Equal(PublicNullableFlowState.
NotNull
, speculativeTypeInfo.Nullability.FlowState);
1404
Assert.Equal(PublicNullableFlowState.
NotNull
, referenceTypeInfo.Nullability.FlowState);
1406
Assert.Equal(PublicNullableFlowState.
NotNull
, coalesceTypeInfo.Nullability.FlowState);
1446
Assert.Equal(PublicNullableFlowState.
NotNull
, speculativeTypeInfo.Nullability.FlowState);
1521
verifySpeculativeTypeInfo(ifStatement.Statement.SpanStart, PublicNullableFlowState.
NotNull
);
1524
verifySpeculativeTypeInfo(conditionalAccessExpression.WhenNotNull.SpanStart, PublicNullableFlowState.
NotNull
);
1527
verifySpeculativeTypeInfo(ternary.WhenFalse.SpanStart, PublicNullableFlowState.
NotNull
);
1534
Assert.Equal(PublicNullableFlowState.
NotNull
, specTypeInfo.Nullability.FlowState);
1577
verifySpeculativeTypeInfo(ifStatement.Statement.SpanStart, PublicNullableFlowState.
NotNull
);
1580
verifySpeculativeTypeInfo(conditionalAccessExpression.WhenNotNull.SpanStart, PublicNullableFlowState.
NotNull
);
1583
verifySpeculativeTypeInfo(ternary.WhenFalse.SpanStart, PublicNullableFlowState.
NotNull
);
1590
Assert.Equal(PublicNullableFlowState.
NotNull
, specTypeInfo.Nullability.FlowState);
2925
Assert.Equal(PublicNullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
4276
Assert.Equal(PublicNullableFlowState.
NotNull
, model.GetTypeInfo(default1).Nullability.FlowState);
4310
Assert.Equal(PublicNullableFlowState.
NotNull
, model.GetTypeInfo(default1).Nullability.FlowState);
4822
Assert.Equal(PublicNullableFlowState.
NotNull
, info.Nullability.FlowState);
4827
Assert.Equal(PublicNullableFlowState.
NotNull
, info.Nullability.FlowState);
4852
Assert.Equal(PublicNullableFlowState.
NotNull
, info.Nullability.FlowState);
4917
Assert.Equal(PublicNullableFlowState.
NotNull
, typeInfo.Nullability.FlowState);
Microsoft.CodeAnalysis.Features (1)
QuickInfo\QuickInfoUtilities.cs (1)
140
NullableFlowState.
NotNull
=> string.Format(FeaturesResources._0_is_not_null_here, symbol.Name),
Microsoft.CodeAnalysis.UnitTests (5)
Symbols\NullabilityInfoTests.cs (5)
19
assertEqualsAndHashCode(new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.
NotNull
),
20
new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.
NotNull
),
23
assertEqualsAndHashCode(new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.
NotNull
),
24
new NullabilityInfo(NullableAnnotation.NotAnnotated, NullableFlowState.
NotNull
),
28
new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.
NotNull
),