1 write to Annotation
Microsoft.CodeAnalysis (1)
Symbols\NullabilityInfo.cs (1)
30
Annotation
= annotation;
40 references to Annotation
Microsoft.CodeAnalysis (4)
Symbols\NullabilityInfo.cs (4)
34
private string GetDebuggerDisplay() => $"{{Annotation: {
Annotation
}, Flow State: {FlowState}}}";
40
Hash.Combine(((int)
Annotation
).GetHashCode(), ((int)FlowState).GetHashCode());
43
Annotation
== other.
Annotation
&&
Microsoft.CodeAnalysis.CSharp (2)
BoundTree\BoundDiscardExpression.cs (1)
33
return new DiscardSymbol(TypeWithAnnotations.Create(this.Type, this.TopLevelNullability.
Annotation
.ToInternalAnnotation()));
BoundTree\BoundNode.cs (1)
245
_attributes |= value.
Annotation
switch
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableExtensions.cs (2)
10
=> typeInfo.ConvertedType?.WithNullableAnnotation(typeInfo.ConvertedNullability.
Annotation
);
13
=> typeInfo.Type?.WithNullableAnnotation(typeInfo.Nullability.
Annotation
);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (19)
Semantics\NullableContextTests.cs (1)
2232
Assert.Equal(expectedAnnotation, typeInfo.Nullability.
Annotation
);
Semantics\NullableReferenceTypesTests.cs (18)
59024
Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(declaration.Type).Nullability.
Annotation
);
59026
Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(declaration.Type).ConvertedNullability.
Annotation
);
62847
Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.Nullability.
Annotation
);
71879
Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(discard1).Nullability.
Annotation
);
71884
Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(discard2).Nullability.
Annotation
);
71889
Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(discard3).Nullability.
Annotation
);
71894
Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(discard4).Nullability.
Annotation
);
71928
Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discard1).Nullability.
Annotation
);
71937
Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discard2).Nullability.
Annotation
);
71966
Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discardPattern1).Nullability.
Annotation
);
71972
Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discardPattern2).Nullability.
Annotation
);
146472
Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.Nullability.
Annotation
);
155998
Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(identifiers[0]).Nullability.
Annotation
);
155999
Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(identifiers[1]).Nullability.
Annotation
);
156000
Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(identifiers[2]).Nullability.
Annotation
);
156001
Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(identifiers[3]).Nullability.
Annotation
);
161254
Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, typeInfo.Nullability.
Annotation
);
161300
Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, typeInfo.Nullability.
Annotation
);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Compilation\SemanticModelAPITests.cs (6)
4493
Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.Nullability.
Annotation
);
4494
Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.ConvertedNullability.
Annotation
);
4557
Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.Nullability.
Annotation
);
4558
Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.ConvertedNullability.
Annotation
);
4571
Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.Nullability.
Annotation
);
4572
Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.ConvertedNullability.
Annotation
);
Symbols\Source\NullablePublicAPITests.cs (5)
1631
Assert.Equal(PublicNullableAnnotation.Annotated, type.Nullability.
Annotation
);
1674
Assert.Equal(PublicNullableAnnotation.None, type.Nullability.
Annotation
);
1717
Assert.Equal(PublicNullableAnnotation.None, type.Nullability.
Annotation
);
1795
Assert.Equal(PublicNullableAnnotation.Annotated, info.Nullability.
Annotation
);
4851
Assert.Equal(PublicNullableAnnotation.NotAnnotated, info.Nullability.
Annotation
);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableExtensions.cs (2)
10
=> typeInfo.ConvertedType?.WithNullableAnnotation(typeInfo.ConvertedNullability.
Annotation
);
13
=> typeInfo.Type?.WithNullableAnnotation(typeInfo.Nullability.
Annotation
);