3 implementations of NullableAnnotation
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.VisualBasic (1)
227 references to NullableAnnotation
Microsoft.Analyzers.Extra (3)
Microsoft.AspNetCore.App.Analyzers (2)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (8)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.CodeStyle (8)
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp (6)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
Microsoft.CodeAnalysis.CSharp.Features (3)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (114)
Compilation\CompilationAPITests.cs (8)
2466Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementType.NullableAnnotation);
2474Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementType.NullableAnnotation);
2482Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementType.NullableAnnotation);
2493Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType).ElementType.NullableAnnotation);
2495Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.None).ElementType.NullableAnnotation);
2497Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.None).ElementType.NullableAnnotation);
2499Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.NotAnnotated).ElementType.NullableAnnotation);
2501Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.Annotated).ElementType.NullableAnnotation);
Symbols\Source\NullablePublicAPITests.cs (106)
151var result = member.Type.NullableAnnotation;
153return member.Type.NullableAnnotation;
218var result = member.Type.NullableAnnotation;
292var result = member.ReturnType.NullableAnnotation;
381var result = member.Type.NullableAnnotation;
503var result = m.ReceiverType.NullableAnnotation;
575Assert.Equal(method.ReturnNullableAnnotation, method.Parameters[0].Type.NullableAnnotation);
577Assert.Equal(PublicNullableAnnotation.None, method.ReceiverType.NullableAnnotation);
578var result = method.ReturnType.NullableAnnotation;
641var result = member.Type.NullableAnnotation;
697var result = array.ElementType.NullableAnnotation;
760var result = method.ReturnType.NullableAnnotation;
826var result = typeParameterSymbol.ConstraintTypes.Single().NullableAnnotation;
892var result = ((INamedTypeSymbol)method.ReturnType).TypeArguments.Single().NullableAnnotation;
949var result = method.TypeArguments.Single().NullableAnnotation;
1006var result = localSymbol.Type.NullableAnnotation;
1178Assert.Equal(declaredSymbol.Type.NullableAnnotation, declaredSymbol.NullableAnnotation);
1861Assert.Equal(expectedAnnotation, methodSymbol.TypeArguments.Single().NullableAnnotation);
1863Assert.Equal(expectedAnnotation, methodSymbol.Parameters.Single().Type.NullableAnnotation);
1865Assert.Equal(expectedAnnotation, methodSymbol.ReturnType.NullableAnnotation);
1904Assert.Equal(expectedAnnotation, methodSymbol.TypeArguments.Single().NullableAnnotation);
1906Assert.Equal(expectedAnnotation, methodSymbol.Parameters.Single().Type.NullableAnnotation);
1950Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
1997Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2058Assert.Equal(expectedAnnotation1, symbols[0].Type.NullableAnnotation);
2060Assert.Equal(expectedAnnotation2, symbols[1].Type.NullableAnnotation);
2101Assert.Equal(expectedAnnotation1, symbols[0].Type.NullableAnnotation);
2103Assert.Equal(expectedAnnotation2, symbols[1].Type.NullableAnnotation);
2140Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation);
2144Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation);
2189Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2221Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
2259Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2291Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2337Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2379Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2422Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2464Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
2512Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2561Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2603Assert.Equal(expectedElementTypeAnnotation, foreachInfo.ElementType.NullableAnnotation);
2741Assert.Equal(PublicNullableAnnotation.Annotated, ((IPropertySymbol)symInfo.Symbol).Type.NullableAnnotation);
2746Assert.Equal(PublicNullableAnnotation.NotAnnotated, ((IPropertySymbol)symInfo.Symbol).Type.NullableAnnotation);
2787Assert.Equal(PublicNullableAnnotation.Annotated, ((IFieldSymbol)symInfo.Symbol).Type.NullableAnnotation);
2792Assert.Equal(PublicNullableAnnotation.NotAnnotated, ((IFieldSymbol)symInfo.Symbol).Type.NullableAnnotation);
2830Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).Type.NullableAnnotation);
2835Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).Type.NullableAnnotation);
2879Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).Type.NullableAnnotation);
2884Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).Type.NullableAnnotation);
2920Assert.Equal(PublicNullableAnnotation.Annotated, typeInfo.Type.NullableAnnotation);
2924Assert.Equal(PublicNullableAnnotation.NotAnnotated, typeInfo.Type.NullableAnnotation);
2929Assert.Equal(PublicNullableAnnotation.None, typeInfo.Type.NullableAnnotation);
2968Assert.Equal(expectedAnnotation, ((IMethodSymbol)symbolInfo.Symbol).TypeArguments[0].NullableAnnotation);
3010Assert.Equal(expectedAnnotation, ((IMethodSymbol)symbolInfo.Symbol).TypeArguments[0].NullableAnnotation);
3052Assert.Equal(PublicNullableAnnotation.NotAnnotated, ((IMethodSymbol)symbolInfo.Symbol).TypeArguments[0].NullableAnnotation);
3054Assert.Equal(expectedAnnotation, ((IMethodSymbol)symbolInfo.Symbol).TypeArguments[1].NullableAnnotation);
3115Assert.Equal(PublicNullableAnnotation.None, ((IMethodSymbol)symbol).TypeArguments[0].NullableAnnotation);
3159Assert.Equal(annotation1, methodSymbol.TypeArguments[0].NullableAnnotation);
3161Assert.Equal(annotation2, methodSymbol.TypeArguments[1].NullableAnnotation);
3204Assert.Equal(annotation, methodSymbol.TypeArguments[0].NullableAnnotation);
3274Assert.Equal(firstAnnotation, propertySymbol.Type.NullableAnnotation);
3276Assert.Equal(secondAnnotation, propertySymbol.Parameters[0].Type.NullableAnnotation);
3325Assert.Equal(annotation, propertySymbol.Type.NullableAnnotation);
3493Assert.Equal(PublicNullableAnnotation.Annotated, lambdaSymbol.Parameters[0].Type.NullableAnnotation);
3505Assert.Equal(PublicNullableAnnotation.Annotated, parameterSymbol.Type.NullableAnnotation);
3546Assert.Equal(PublicNullableAnnotation.NotAnnotated, innerLambdaSymbol.Parameters[0].Type.NullableAnnotation);
3558Assert.Equal(PublicNullableAnnotation.Annotated, o1Symbol.Type.NullableAnnotation);
3569Assert.Equal(PublicNullableAnnotation.NotAnnotated, o2Symbol.Type.NullableAnnotation);
3607Assert.Equal(PublicNullableAnnotation.NotAnnotated, innerLambdaSymbol.Parameters[0].Type.NullableAnnotation);
3619Assert.Equal(PublicNullableAnnotation.Annotated, o1Symbol.Type.NullableAnnotation);
3630Assert.Equal(PublicNullableAnnotation.NotAnnotated, o2Symbol.Type.NullableAnnotation);
3921Assert.Equal(PublicNullableAnnotation.NotAnnotated, o1Symbol.Type.NullableAnnotation);
3923Assert.Equal(PublicNullableAnnotation.Annotated, o2Symbol.Type.NullableAnnotation);
3935Assert.Equal(PublicNullableAnnotation.NotAnnotated, o3Symbol.Type.NullableAnnotation);
3937Assert.Equal(PublicNullableAnnotation.Annotated, o4Symbol.Type.NullableAnnotation);
3985Assert.Equal(PublicNullableAnnotation.NotAnnotated, innerLambdaSymbol1.Parameters[0].Type.NullableAnnotation);
3987Assert.Equal(PublicNullableAnnotation.NotAnnotated, innerLambdaSymbol1.Parameters[1].Type.NullableAnnotation);
3989Assert.Equal(PublicNullableAnnotation.NotAnnotated, innerLambdaSymbol1.Parameters[2].Type.NullableAnnotation);
3995Assert.Equal(PublicNullableAnnotation.NotAnnotated, innerLambdaSymbol2.Parameters[0].Type.NullableAnnotation);
3997Assert.Equal(PublicNullableAnnotation.NotAnnotated, innerLambdaSymbol2.Parameters[1].Type.NullableAnnotation);
3999Assert.Equal(PublicNullableAnnotation.NotAnnotated, innerLambdaSymbol2.Parameters[2].Type.NullableAnnotation);
4372Assert.Equal(PublicNullableAnnotation.NotAnnotated, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4400Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4430Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4460Assert.Equal(PublicNullableAnnotation.NotAnnotated, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4490Assert.Equal(PublicNullableAnnotation.NotAnnotated, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4522Assert.Equal(PublicNullableAnnotation.NotAnnotated, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4555Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4583Assert.Equal(PublicNullableAnnotation.NotAnnotated, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4613Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4644Assert.Equal(PublicNullableAnnotation.NotAnnotated, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4677Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation);
4703Assert.Equal(PublicNullableAnnotation.NotAnnotated, symbol2.Parameters.Single().Type.NullableAnnotation);
4781var actualAnnotations = invocations.Select(inv => (((IMethodSymbol)model.GetSymbolInfo(inv).Symbol)).TypeArguments[0].NullableAnnotation).ToArray();
4821Assert.Equal(PublicNullableAnnotation.NotAnnotated, info.Type.NullableAnnotation);
4826Assert.Equal(PublicNullableAnnotation.NotAnnotated, info.Type.NullableAnnotation);
4916Assert.Equal(PublicNullableAnnotation.NotAnnotated, typeInfo.Type.NullableAnnotation);
5201Assert.Equal(expectedAnnotation, typeInfo.Type.NullableAnnotation);
5236Assert.Equal(PublicNullableAnnotation.None, typeInfo.Type.NullableAnnotation);
5259Assert.Equal(PublicNullableAnnotation.NotAnnotated, type.NullableAnnotation);
5282Assert.Equal(PublicNullableAnnotation.NotAnnotated, type.NullableAnnotation);
5314Assert.Equal(PublicNullableAnnotation.NotAnnotated, type.NullableAnnotation);
5337Assert.Equal(PublicNullableAnnotation.NotAnnotated, type.NullableAnnotation);
5359Assert.Equal(PublicNullableAnnotation.NotAnnotated, type.NullableAnnotation);
5407Assert.Equal(PublicNullableAnnotation.NotAnnotated, type.NullableAnnotation);
5464Assert.Equal(PublicNullableAnnotation.NotAnnotated, type.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (8)
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Microsoft.CodeAnalysis.Features (3)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (16)
Microsoft.Extensions.Options.SourceGeneration (3)
Microsoft.Gen.Logging (6)
Microsoft.Maui.Controls.BindingSourceGen (1)
System.Text.Json.SourceGeneration (3)