417 references to Annotated
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
370loggerType = gen.TypeExpression(t.WithNullableAnnotation(NullableAnnotation.Annotated));
Microsoft.AspNetCore.App.Analyzers (2)
src\Shared\RoslynUtils\SymbolExtensions.cs (2)
167NullableAnnotation: NullableAnnotation.Annotated 173NullableAnnotation: NullableAnnotation.Annotated
Microsoft.AspNetCore.Http.RequestDelegateGenerator (8)
src\Shared\RoslynUtils\SymbolExtensions.cs (2)
167NullableAnnotation: NullableAnnotation.Annotated 173NullableAnnotation: NullableAnnotation.Annotated
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (3)
115if (endpointParameter.ElementType.NullableAnnotation == NullableAnnotation.Annotated) 137if (endpointParameter.IsOptional || endpointParameter.Type.NullableAnnotation == NullableAnnotation.Annotated) 177if (parameter.IsArray && parameter.ElementType.NullableAnnotation == NullableAnnotation.Annotated)
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (3)
40var isOptional = p.IsOptional || type.NullableAnnotation == NullableAnnotation.Annotated; 92if (endpoint.Response.IsAwaitable && endpoint.Response.WrappedResponseType.NullableAnnotation == NullableAnnotation.Annotated) 425if (endpoint.Response?.WrappedResponseType.NullableAnnotation == NullableAnnotation.Annotated)
Microsoft.CodeAnalysis (1)
Symbols\NullableFlowState.cs (1)
40return CodeAnalysis.NullableAnnotation.Annotated;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
34var isNonNullableReferenceType = type.IsReferenceType && type.NullableAnnotation != NullableAnnotation.Annotated;
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
60parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)],
Microsoft.CodeAnalysis.CSharp (8)
BoundTree\BoundNode.cs (2)
247CodeAnalysis.NullableAnnotation.Annotated => BoundNodeAttributes.TopLevelAnnotated, 284BoundNodeAttributes.TopLevelAnnotated => CodeAnalysis.NullableAnnotation.Annotated,
SymbolDisplay\SymbolDisplayVisitor.Types.cs (3)
74AddPunctuation(type.NullableAnnotation == CodeAnalysis.NullableAnnotation.Annotated ? SyntaxKind.QuestionToken : SyntaxKind.ExclamationToken); 82case CodeAnalysis.NullableAnnotation.Annotated: 874case CodeAnalysis.NullableAnnotation.Annotated:
Symbols\NullableAnnotationExtensions.cs (2)
131NullableAnnotation.Annotated => CodeAnalysis.NullableAnnotation.Annotated, 153CodeAnalysis.NullableAnnotation.Annotated => CSharp.NullableAnnotation.Annotated,
Symbols\PublicModel\TypeParameterSymbol.cs (1)
40true => CodeAnalysis.NullableAnnotation.Annotated,
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (2)
238if (localSymbol.Type.NullableAnnotation == NullableAnnotation.Annotated) 254if (rightType.Type is null or { NullableAnnotation: NullableAnnotation.Annotated })
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
413property.Type.NullableAnnotation == NullableAnnotation.Annotated
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
150if (typeSymbol.NullableAnnotation == NullableAnnotation.Annotated)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
225.Where(tp => tp.NullableAnnotation == NullableAnnotation.Annotated)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
62NullableAnnotation.Annotated => NullableSyntaxAnnotationEx.AnnotatedOrNotAnnotated,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (5)
68if (underlyingType.NullableAnnotation == NullableAnnotation.Annotated) 102if (symbol.NullableAnnotation == NullableAnnotation.Annotated) 113return symbol.NullableAnnotation is NullableAnnotation.Annotated 308if (symbol is { IsValueType: false, NullableAnnotation: NullableAnnotation.Annotated }) 363if (symbol is { IsValueType: false, NullableAnnotation: NullableAnnotation.Annotated })
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1113return CreateResult(SpecialType.System_Object, NullableAnnotation.Annotated); 1138return symbol.WithNullableAnnotation(NullableAnnotation.Annotated);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
CodeGen\CodeGenLocalFunctionTests.cs (2)
5363Assert.Equal(NullableAnnotation.Annotated, localFn1.ReturnTypeWithAnnotations.NullableAnnotation); 5367Assert.Equal(NullableAnnotation.Annotated, param.TypeWithAnnotations.NullableAnnotation);
CodeGen\CodeGenTupleTest.cs (7)
6813elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated)); 6820elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.None)); 6849tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.Annotated, 9)); 6882elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated)); 6889elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.None)); 6918tuple2 = comp.CreateTupleTypeSymbol(elementTypes, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.Annotated, 9)); 29006var nullableObject = TypeWithAnnotations.Create(@object, NullableAnnotation.Annotated);
Microsoft.CodeAnalysis.CSharp.Features (6)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.CompletionSymbolDisplay.cs (1)
122if (symbol.NullableAnnotation == NullableAnnotation.Annotated)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
711if (methodSymbol.ReturnType.NullableAnnotation != NullableAnnotation.Annotated)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (2)
238if (localSymbol.Type.NullableAnnotation == NullableAnnotation.Annotated) 254if (rightType.Type is null or { NullableAnnotation: NullableAnnotation.Annotated })
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
413property.Type.NullableAnnotation == NullableAnnotation.Annotated
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
150if (typeSymbol.NullableAnnotation == NullableAnnotation.Annotated)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IConversionExpression.cs (1)
5294Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, iopTree.Value.Type.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (121)
Semantics\DelegateTypeTests.cs (2)
15562var funcOfObjectNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(objectType, NullableAnnotation.Annotated))); 15563var funcOfStringNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(stringType, NullableAnnotation.Annotated)));
Semantics\NativeIntegerTests.cs (1)
1628Assert.Same(underlyingType, ((INamedTypeSymbol)type.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated)).NativeIntegerUnderlyingType);
Semantics\NullableReferenceTypesTests.cs (118)
5173Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.NullableAnnotation); 5174Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation); 11181verify("C1.F2", "System.String?", NullableAnnotation.Annotated); 11183verify("C1.F4", "System.Int32?", NullableAnnotation.Annotated); 11184verify("C1.F5", "System.Int32?", NullableAnnotation.Annotated); 11186verify("C2.F2", "System.String?", NullableAnnotation.Annotated); 11188verify("C2.F4", "System.Int32?", NullableAnnotation.Annotated); 11189verify("C2.F5", "System.Int32?", NullableAnnotation.Annotated); 11191verify("C3.F2", "System.String?", NullableAnnotation.Annotated); 11193verify("C3.F4", "System.Int32?", NullableAnnotation.Annotated); 11194verify("C3.F5", "System.Int32?", NullableAnnotation.Annotated); 11277verify("C1.F2", "T?", NullableAnnotation.Annotated); 11279verify("C1.F4", "T?", NullableAnnotation.Annotated); 11281verify("C1.F6", "T?", NullableAnnotation.Annotated); 11282verify("C1.F7", "T?", NullableAnnotation.Annotated); 11284verify("C2.F2", "T?", NullableAnnotation.Annotated); 11286verify("C2.F4", "T?", NullableAnnotation.Annotated); 11288verify("C2.F6", "T?", NullableAnnotation.Annotated); 11289verify("C2.F7", "T?", NullableAnnotation.Annotated); 11291verify("C3.F2", "T?", NullableAnnotation.Annotated); 11293verify("C3.F4", "T?", NullableAnnotation.Annotated); 11295verify("C3.F6", "T?", NullableAnnotation.Annotated); 11296verify("C3.F7", "T?", NullableAnnotation.Annotated); 12100Assert.Equal(NullableAnnotation.Annotated, m1.Parameters[0].TypeWithAnnotations.NullableAnnotation); 13899Assert.Equal(NullableAnnotation.Annotated, m1.Parameters[0].TypeWithAnnotations.NullableAnnotation); 13905Assert.Equal(NullableAnnotation.Annotated, m2.ReturnTypeWithAnnotations.NullableAnnotation); 59020Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59024Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(declaration.Type).Nullability.Annotation); 59026Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(declaration.Type).ConvertedNullability.Annotation); 59082Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59114Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59143Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59176Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59208Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59241Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59275Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59302Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59332Assert.Equal(NullableAnnotation.Annotated, type.NullableAnnotation); 59360Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59364Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59368Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 62847Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.Nullability.Annotation); 71255Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71291Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71294Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71332Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71335Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71369Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71372Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71441Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71444Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71514Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71879Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(discard1).Nullability.Annotation); 71884Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(discard2).Nullability.Annotation); 113113m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Annotated))), 113120m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Annotated))), 115807var c3 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115837var i1 = iDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(iDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115858var i2b = i2.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(iDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115863var i2c = i2.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(i2.TypeParameters.Single(), NullableAnnotation.Annotated))); 115867var c3 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115872var i3b = i3.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(i3.TypeParameters.Single(), NullableAnnotation.Annotated))); 126840var inputs = new[] { NullableAnnotation.Annotated, NullableAnnotation.Oblivious, NullableAnnotation.NotAnnotated }; 126845{ NullableAnnotation.Annotated, NullableAnnotation.Annotated, NullableAnnotation.Annotated }, 126846{ NullableAnnotation.Annotated, NullableAnnotation.Oblivious, NullableAnnotation.Oblivious }, 126847{ NullableAnnotation.Annotated, NullableAnnotation.Oblivious, NullableAnnotation.NotAnnotated }, 126872var inputs = new[] { NullableAnnotation.Annotated, NullableAnnotation.Oblivious, NullableAnnotation.NotAnnotated }; 126877{ NullableAnnotation.Annotated, NullableAnnotation.Oblivious, NullableAnnotation.NotAnnotated }, 126903var inputs = new[] { NullableAnnotation.Annotated, NullableAnnotation.Oblivious, NullableAnnotation.NotAnnotated }; 126908{ NullableAnnotation.Annotated, NullableAnnotation.Annotated, NullableAnnotation.NotAnnotated }, 126909{ NullableAnnotation.Annotated, NullableAnnotation.Oblivious, NullableAnnotation.NotAnnotated }, 139422Assert.True(dGoo.Parameters[0].TypeWithAnnotations.NullableAnnotation == NullableAnnotation.Annotated); 139450Assert.Equal(NullableAnnotation.Annotated, c2Goo.Parameters[0].TypeWithAnnotations.NullableAnnotation); 139478Assert.Equal(NullableAnnotation.Annotated, ((ArrayTypeSymbol)c2Goo.Parameters[0].Type).ElementTypeWithAnnotations.NullableAnnotation); 139510Assert.Equal(NullableAnnotation.Annotated, tuple.TupleElements[1].TypeWithAnnotations.NullableAnnotation); 139538Assert.Equal(NullableAnnotation.Annotated, c2Goo.ReturnTypeWithAnnotations.NullableAnnotation); 139566Assert.Equal(NullableAnnotation.Annotated, ((ArrayTypeSymbol)c2Goo.ReturnType).ElementTypeWithAnnotations.NullableAnnotation); 139598Assert.Equal(NullableAnnotation.Annotated, tuple.TupleElements[1].TypeWithAnnotations.NullableAnnotation); 139621Assert.Equal(NullableAnnotation.Annotated, dGoo.Parameters[0].TypeWithAnnotations.NullableAnnotation); 139644Assert.Equal(NullableAnnotation.Annotated, ((ArrayTypeSymbol)dGoo.Parameters[0].Type).ElementTypeWithAnnotations.NullableAnnotation); 139671Assert.Equal(NullableAnnotation.Annotated, tuple.TupleElements[1].TypeWithAnnotations.NullableAnnotation); 139694Assert.Equal(NullableAnnotation.Annotated, dGoo.ReturnTypeWithAnnotations.NullableAnnotation); 139717Assert.Equal(NullableAnnotation.Annotated, ((ArrayTypeSymbol)dGoo.ReturnType).ElementTypeWithAnnotations.NullableAnnotation); 139744Assert.Equal(NullableAnnotation.Annotated, tuple.TupleElements[1].TypeWithAnnotations.NullableAnnotation); 139769Assert.Equal(NullableAnnotation.Annotated, dGoo.ReturnTypeWithAnnotations.NullableAnnotation); 139775Assert.Equal(NullableAnnotation.Annotated, tuple.TupleElements[0].TypeWithAnnotations.NullableAnnotation); 145379Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.NullableAnnotation); 145380Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation); 145420Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.NullableAnnotation); 145421Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation); 145460Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.NullableAnnotation); 145461Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation); 145498Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.NullableAnnotation); 145499Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation); 145536Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.NullableAnnotation); 145537Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation); 145640Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.NullableAnnotation); 145641Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation); 145679Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.NullableAnnotation); 145680Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation); 146472Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.Nullability.Annotation); 149969Assert.Equal(NullableAnnotation.Annotated, parameterType.NullableAnnotation); 154803VerifyVariableAnnotation(model, locals[0], "T? t1", NullableAnnotation.Annotated); 154804VerifyVariableAnnotation(model, locals[1], "T? t2", NullableAnnotation.Annotated); 154805VerifyVariableAnnotation(model, locals[2], "T? t3", NullableAnnotation.Annotated); 154806VerifyVariableAnnotation(model, locals[3], "T? t4", NullableAnnotation.Annotated); 154807VerifyVariableAnnotation(model, locals[4], "T? t5", NullableAnnotation.Annotated); 154872VerifyVariableAnnotation(model, locals[0], "T? y1", NullableAnnotation.Annotated); 154873VerifyVariableAnnotation(model, locals[1], "T? y2", NullableAnnotation.Annotated); 154874VerifyVariableAnnotation(model, locals[2], "T? y3", NullableAnnotation.Annotated); 154875VerifyVariableAnnotation(model, locals[3], "T? y4", NullableAnnotation.Annotated); 154876VerifyVariableAnnotation(model, locals[4], "U? y5", NullableAnnotation.Annotated); 154884(expectedAnnotation == NullableAnnotation.Annotated) ? CodeAnalysis.NullableAnnotation.Annotated : CodeAnalysis.NullableAnnotation.NotAnnotated, 158820Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (209)
Compilation\CompilationAPITests.cs (12)
2500Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.Annotated).ElementNullableAnnotation); 2501Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.Annotated).ElementType.NullableAnnotation); 2707type = comp.CreateAnonymousTypeSymbol(memberTypes, memberNames, memberNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated)); 2709AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated }, GetAnonymousTypeNullableAnnotations(type)); 3045type = genericType.Construct(typeArguments, ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated)); 3047AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated }, type.TypeArgumentNullableAnnotations); 3048AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated }, type.TypeArgumentNullableAnnotations()); 3080type = genericMethod.Construct(typeArguments, ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated)); 3082AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated }, type.TypeArgumentNullableAnnotations); 3083AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated }, type.TypeArgumentNullableAnnotations());
Compilation\TypeInfoTests.cs (17)
23var nullable = new NullabilityInfo(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableFlowState.MaybeNull); 27EqualityTesting.AssertEqual(new TypeInfo(obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), int32, nullable, notNullable), 28new TypeInfo(obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), int32, nullable, notNullable)); 30EqualityTesting.AssertNotEqual(new TypeInfo(obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), nullable, nullable), 31new TypeInfo(obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), nullable, nullable)); 33EqualityTesting.AssertNotEqual(new TypeInfo(int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), nullable, nullable), 34new TypeInfo(obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), nullable, nullable)); 36EqualityTesting.AssertNotEqual(new TypeInfo(obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), nullable, nullable), 37new TypeInfo(obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.NotAnnotated), int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), notNullable, nullable)); 39EqualityTesting.AssertNotEqual(new TypeInfo(obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), nullable, nullable), 40new TypeInfo(obj.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated), int32, nullable, notNullable));
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1570ImmutableArray.Create(c.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.NotAnnotated), c.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated)),
Symbols\PartialPropertiesTests.cs (1)
1684Assert.Equal(NullableAnnotation.Annotated, p2.TypeWithAnnotations.NullableAnnotation);
Symbols\Source\NullablePublicAPITests.cs (176)
58Assert.Equal(PublicNullableAnnotation.Annotated, arrayTypes[0].ElementNullableAnnotation); 59Assert.Equal(PublicNullableAnnotation.Annotated, arrayTypes[0].ElementType.NullableAnnotation); 94Assert.Equal(PublicNullableAnnotation.Annotated, expressionTypes[1].TypeArgumentNullableAnnotations.Single()); 95Assert.Equal(PublicNullableAnnotation.Annotated, expressionTypes[1].TypeArgumentNullableAnnotations().Single()); 157PublicNullableAnnotation.Annotated, 159PublicNullableAnnotation.Annotated, 161PublicNullableAnnotation.Annotated, 163PublicNullableAnnotation.Annotated); 224PublicNullableAnnotation.Annotated, 226PublicNullableAnnotation.Annotated, 228PublicNullableAnnotation.Annotated, 230PublicNullableAnnotation.Annotated); 298PublicNullableAnnotation.Annotated, 300PublicNullableAnnotation.Annotated, 302PublicNullableAnnotation.Annotated, 304PublicNullableAnnotation.Annotated); 388PublicNullableAnnotation.Annotated, 389PublicNullableAnnotation.Annotated, 392PublicNullableAnnotation.Annotated, 393PublicNullableAnnotation.Annotated); 491PublicNullableAnnotation.Annotated, 493PublicNullableAnnotation.Annotated, 495PublicNullableAnnotation.Annotated, 497PublicNullableAnnotation.Annotated); 584PublicNullableAnnotation.Annotated, 586PublicNullableAnnotation.Annotated, 588PublicNullableAnnotation.Annotated, 590PublicNullableAnnotation.Annotated); 647PublicNullableAnnotation.Annotated, 649PublicNullableAnnotation.Annotated); 703PublicNullableAnnotation.Annotated, 705PublicNullableAnnotation.Annotated, 707PublicNullableAnnotation.Annotated, 709PublicNullableAnnotation.Annotated); 767PublicNullableAnnotation.Annotated, 769PublicNullableAnnotation.Annotated, 772PublicNullableAnnotation.Annotated, 774PublicNullableAnnotation.Annotated); 832PublicNullableAnnotation.Annotated, 834PublicNullableAnnotation.Annotated, 836PublicNullableAnnotation.Annotated, 838PublicNullableAnnotation.Annotated); 900PublicNullableAnnotation.Annotated, 902PublicNullableAnnotation.Annotated, 905PublicNullableAnnotation.Annotated, 907PublicNullableAnnotation.Annotated); 957PublicNullableAnnotation.Annotated, 959PublicNullableAnnotation.Annotated, 962PublicNullableAnnotation.Annotated, 964PublicNullableAnnotation.Annotated 1015PublicNullableAnnotation.Annotated, 1017PublicNullableAnnotation.Annotated, 1020PublicNullableAnnotation.Annotated, 1022PublicNullableAnnotation.Annotated 1216var nullable = new NullabilityInfo(PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 1266var @null = new NullabilityInfo(PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 1631Assert.Equal(PublicNullableAnnotation.Annotated, type.Nullability.Annotation); 1795Assert.Equal(PublicNullableAnnotation.Annotated, info.Nullability.Annotation); 1854verifySymbolInfo((IMethodSymbol)symbolInfo.Symbol, PublicNullableAnnotation.Annotated); 1897verifySymbolInfo((IMethodSymbol)symbolInfo.Symbol, PublicNullableAnnotation.Annotated); 1949Assert.Equal(PublicNullableAnnotation.Annotated, symbol.NullableAnnotation); 1950Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation); 1955Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.Nullability.Annotation); 1956Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.ConvertedNullability.Annotation); 1989assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated); 1990assertAnnotation(declarations[2], PublicNullableAnnotation.Annotated); 2049assertAnnotation(declarations[0], PublicNullableAnnotation.Annotated, PublicNullableAnnotation.Annotated); 2050assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated, PublicNullableAnnotation.Annotated); 2051assertAnnotation(declarations[2], PublicNullableAnnotation.Annotated, PublicNullableAnnotation.Annotated); 2052assertAnnotation(declarations[4], PublicNullableAnnotation.Annotated, PublicNullableAnnotation.Annotated); 2092assertAnnotation(declarations[0], PublicNullableAnnotation.NotAnnotated, PublicNullableAnnotation.Annotated); 2093assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated, PublicNullableAnnotation.Annotated); 2094assertAnnotation(declarations[2], PublicNullableAnnotation.Annotated, PublicNullableAnnotation.Annotated); 2095assertAnnotation(declarations[4], PublicNullableAnnotation.Annotated, PublicNullableAnnotation.NotAnnotated); 2139Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).NullableAnnotation); 2140Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation); 2143Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).NullableAnnotation); 2144Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation); 2178assertAnnotation(declarations[0], PublicNullableAnnotation.Annotated); 2179assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated); 2180assertAnnotation(declarations[2], PublicNullableAnnotation.Annotated); 2181assertAnnotation(declarations[3], PublicNullableAnnotation.Annotated); 2182assertAnnotation(declarations[4], PublicNullableAnnotation.Annotated); 2183assertAnnotation(declarations[5], PublicNullableAnnotation.Annotated); 2220Assert.Equal(PublicNullableAnnotation.Annotated, symbol.NullableAnnotation); 2221Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation); 2250assertAnnotation(declarations[0], PublicNullableAnnotation.Annotated); 2251assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated); 2252assertAnnotation(declarations[2], PublicNullableAnnotation.Annotated); 2253assertAnnotation(declarations[3], PublicNullableAnnotation.Annotated); 2284assertAnnotation(declarations[0], PublicNullableAnnotation.Annotated); 2285assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated); 2296Assert.Equal(PublicNullableAnnotation.Annotated, typeInfo.Nullability.Annotation); 2328assertAnnotation(declarations[0], PublicNullableAnnotation.Annotated); 2329assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated); 2330assertAnnotation(declarations[2], PublicNullableAnnotation.Annotated); 2331assertAnnotation(declarations[3], PublicNullableAnnotation.Annotated); 2371assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated); 2372assertAnnotation(declarations[2], PublicNullableAnnotation.Annotated); 2373assertAnnotation(declarations[3], PublicNullableAnnotation.Annotated); 2415assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated); 2416assertAnnotation(declarations[3], PublicNullableAnnotation.Annotated); 2463Assert.Equal(PublicNullableAnnotation.Annotated, symbol.NullableAnnotation); 2464Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation); 2467Assert.Equal(PublicNullableAnnotation.Annotated, typeInfo.Nullability.Annotation); 2468Assert.Equal(PublicNullableAnnotation.Annotated, typeInfo.ConvertedNullability.Annotation); 2469Assert.Equal(PublicNullableAnnotation.Annotated, typeInfo.Type.NullableAnnotation); 2470Assert.Equal(PublicNullableAnnotation.Annotated, typeInfo.ConvertedType.NullableAnnotation); 2503assertAnnotation(declarations[0], PublicNullableAnnotation.Annotated); 2506assertAnnotation(declarations[3], PublicNullableAnnotation.Annotated); 2548assertAnnotation(declarations[0], PublicNullableAnnotation.Annotated); 2549assertAnnotation(declarations[1], PublicNullableAnnotation.Annotated); 2550assertAnnotation(declarations[2], PublicNullableAnnotation.Annotated); 2552assertAnnotation(declarations[4], PublicNullableAnnotation.Annotated); 2554assertAnnotation(declarations[6], PublicNullableAnnotation.Annotated); 2555assertAnnotation(declarations[7], PublicNullableAnnotation.Annotated); 2569Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.Nullability.Annotation); 2570Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.ConvertedNullability.Annotation); 2597assertAnnotation(declarations[0], PublicNullableAnnotation.Annotated); 2740Assert.Equal(PublicNullableAnnotation.Annotated, ((IPropertySymbol)symInfo.Symbol).NullableAnnotation); 2741Assert.Equal(PublicNullableAnnotation.Annotated, ((IPropertySymbol)symInfo.Symbol).Type.NullableAnnotation); 2742Assert.Equal(PublicNullableAnnotation.Annotated, symInfo.Symbol.ContainingType.TypeArgumentNullableAnnotations[0]); 2743Assert.Equal(PublicNullableAnnotation.Annotated, symInfo.Symbol.ContainingType.TypeArgumentNullableAnnotations().First()); 2786Assert.Equal(PublicNullableAnnotation.Annotated, ((IFieldSymbol)symInfo.Symbol).NullableAnnotation); 2787Assert.Equal(PublicNullableAnnotation.Annotated, ((IFieldSymbol)symInfo.Symbol).Type.NullableAnnotation); 2788Assert.Equal(PublicNullableAnnotation.Annotated, symInfo.Symbol.ContainingType.TypeArgumentNullableAnnotations[0]); 2789Assert.Equal(PublicNullableAnnotation.Annotated, symInfo.Symbol.ContainingType.TypeArgumentNullableAnnotations().First()); 2829Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).NullableAnnotation); 2830Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).Type.NullableAnnotation); 2831Assert.Equal(PublicNullableAnnotation.Annotated, symInfo.Symbol.ContainingType.TypeArgumentNullableAnnotations[0]); 2832Assert.Equal(PublicNullableAnnotation.Annotated, symInfo.Symbol.ContainingType.TypeArgumentNullableAnnotations().First()); 2834Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).NullableAnnotation); 2835Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).Type.NullableAnnotation); 2878Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).NullableAnnotation); 2879Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).Type.NullableAnnotation); 2880Assert.Equal(PublicNullableAnnotation.Annotated, symInfo.Symbol.ContainingType.TypeArgumentNullableAnnotations[0]); 2881Assert.Equal(PublicNullableAnnotation.Annotated, symInfo.Symbol.ContainingType.TypeArgumentNullableAnnotations().First()); 2883Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).NullableAnnotation); 2884Assert.Equal(PublicNullableAnnotation.Annotated, ((IEventSymbol)symInfo.Symbol).Type.NullableAnnotation); 2920Assert.Equal(PublicNullableAnnotation.Annotated, typeInfo.Type.NullableAnnotation); 2959verifyAnnotation(collectionInitializer.Expressions[0], PublicNullableAnnotation.Annotated); 3001verifyAnnotation(collectionInitializer.Expressions[0], PublicNullableAnnotation.Annotated); 3043verifyAnnotation(collectionInitializer.Expressions[0], PublicNullableAnnotation.Annotated); 3150verifyAnnotation(collectionInitializer.Expressions[0], PublicNullableAnnotation.Annotated, PublicNullableAnnotation.NotAnnotated); 3151verifyAnnotation(collectionInitializer.Expressions[1], PublicNullableAnnotation.NotAnnotated, PublicNullableAnnotation.Annotated); 3195verifyAnnotation(collectionInitializer.Expressions[0], PublicNullableAnnotation.Annotated); 3196verifyAnnotation(collectionInitializer.Expressions[1], PublicNullableAnnotation.Annotated); 3259verifyAnnotation(indexers.Slice(0, 2), PublicNullableAnnotation.Annotated, PublicNullableAnnotation.NotAnnotated); 3260verifyAnnotation(indexers.Slice(2, 2), PublicNullableAnnotation.NotAnnotated, PublicNullableAnnotation.Annotated); 3311verifyAnnotation(elementAccesses.Slice(0, 2), PublicNullableAnnotation.Annotated); 3360verifyAnnotation(elementAccesses[0], PublicNullableAnnotation.Annotated); 3406verifyAnnotations(operators[0], PublicNullableAnnotation.Annotated, "S<T?> S<T?>.operator ~(S<T?> s)"); 3451verifyAnnotations(operators[0], PublicNullableAnnotation.Annotated, "S<T?> S<T?>.operator +(S<T?> x, S<T?> y)"); 3492Assert.Equal(PublicNullableAnnotation.Annotated, lambdaSymbol.Parameters[0].NullableAnnotation); 3493Assert.Equal(PublicNullableAnnotation.Annotated, lambdaSymbol.Parameters[0].Type.NullableAnnotation); 3504Assert.Equal(PublicNullableAnnotation.Annotated, parameterSymbol.NullableAnnotation); 3505Assert.Equal(PublicNullableAnnotation.Annotated, parameterSymbol.Type.NullableAnnotation); 3557Assert.Equal(PublicNullableAnnotation.Annotated, o1Symbol.NullableAnnotation); 3558Assert.Equal(PublicNullableAnnotation.Annotated, o1Symbol.Type.NullableAnnotation); 3618Assert.Equal(PublicNullableAnnotation.Annotated, o1Symbol.NullableAnnotation); 3619Assert.Equal(PublicNullableAnnotation.Annotated, o1Symbol.Type.NullableAnnotation); 3922Assert.Equal(PublicNullableAnnotation.Annotated, o2Symbol.NullableAnnotation); 3923Assert.Equal(PublicNullableAnnotation.Annotated, o2Symbol.Type.NullableAnnotation); 3936Assert.Equal(PublicNullableAnnotation.Annotated, o4Symbol.NullableAnnotation); 3937Assert.Equal(PublicNullableAnnotation.Annotated, o4Symbol.Type.NullableAnnotation); 4336verify(exprs[0], PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 4337verify(exprs[1], PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 4784PublicNullableAnnotation.Annotated, 4787PublicNullableAnnotation.Annotated, 5190test(SemanticModelOptions.None, expectedAnnotation: PublicNullableAnnotation.Annotated);
Symbols\Source\UpdatedContainingSymbolAndNullableAnntotationTests.cs (2)
43var wrappedLocal1 = UpdatedContainingSymbolAndNullableAnnotationLocal.CreateForTest(local1, m2, TypeWithAnnotations.Create(local1.Type, NullableAnnotation.Annotated)); 44var wrappedLocal1a = UpdatedContainingSymbolAndNullableAnnotationLocal.CreateForTest(local1, m2, TypeWithAnnotations.Create(local1.Type, NullableAnnotation.Annotated));
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
225.Where(tp => tp.NullableAnnotation == NullableAnnotation.Annotated)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
62NullableAnnotation.Annotated => NullableSyntaxAnnotationEx.AnnotatedOrNotAnnotated,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (5)
68if (underlyingType.NullableAnnotation == NullableAnnotation.Annotated) 102if (symbol.NullableAnnotation == NullableAnnotation.Annotated) 113return symbol.NullableAnnotation is NullableAnnotation.Annotated 308if (symbol is { IsValueType: false, NullableAnnotation: NullableAnnotation.Annotated }) 363if (symbol is { IsValueType: false, NullableAnnotation: NullableAnnotation.Annotated })
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1113return CreateResult(SpecialType.System_Object, NullableAnnotation.Annotated); 1138return symbol.WithNullableAnnotation(NullableAnnotation.Annotated);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Utilities\SymbolEquivalenceComparerTests.cs (3)
1355Assert.Equal(NullableAnnotation.Annotated, a1.NullableAnnotation); 1483Assert.Equal(NullableAnnotation.Annotated, a2.NullableAnnotation); 1546Assert.Equal(NullableAnnotation.Annotated, a2.NullableAnnotation);
Microsoft.CodeAnalysis.Features (5)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (3)
111? equatableType.Construct(_containingType.WithNullableAnnotation(NullableAnnotation.Annotated)) 134CodeGenerationSymbolFactory.CreateParameterSymbol(_containingType.IsValueType ? _containingType : _containingType.WithNullableAnnotation(NullableAnnotation.Annotated), LeftName), 135CodeGenerationSymbolFactory.CreateParameterSymbol(_containingType.IsValueType ? _containingType : _containingType.WithNullableAnnotation(NullableAnnotation.Annotated), RightName));
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
250if (parameter.Type.NullableAnnotation == NullableAnnotation.Annotated)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
483if (symbol.NullableAnnotation == NullableAnnotation.Annotated)
Microsoft.CodeAnalysis.UnitTests (5)
Symbols\NullabilityInfoTests.cs (5)
19assertEqualsAndHashCode(new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.NotNull), 20new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.NotNull), 23assertEqualsAndHashCode(new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.NotNull), 27assertEqualsAndHashCode(new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.MaybeNull), 28new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.NotNull),
Microsoft.CodeAnalysis.Workspaces (3)
Editing\SyntaxGenerator.cs (1)
248return Equals(current, typeParameter) && current.NullableAnnotation == NullableAnnotation.Annotated;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
34var isNonNullableReferenceType = type.IsReferenceType && type.NullableAnnotation != NullableAnnotation.Annotated;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
60parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)],
Microsoft.Extensions.Options.SourceGeneration (3)
Parser.cs (3)
418enumeratedIsNullable = enumeratedType.IsReferenceType || enumeratedType.NullableAnnotation == NullableAnnotation.Annotated; 420enumeratedMayBeNull = enumeratedType.NullableAnnotation == NullableAnnotation.Annotated; 588memberType.IsReferenceType || memberType.NullableAnnotation == NullableAnnotation.Annotated,
Microsoft.Gen.Logging (5)
Parsing\Parser.cs (3)
584IsNullable = paramTypeSymbol.NullableAnnotation == NullableAnnotation.Annotated, 677isNullable = typeSymbol.NullableAnnotation == NullableAnnotation.Annotated; 731isNullable = parameter.Type.NullableAnnotation == NullableAnnotation.Annotated;
Parsing\Parser.LogProperties.cs (1)
203IsNullable = property.Type.NullableAnnotation == NullableAnnotation.Annotated,
Parsing\Parser.TagProvider.cs (1)
153if (type.NullableAnnotation == NullableAnnotation.Annotated)
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
48if (type.NullableAnnotation is NullableAnnotation.Annotated)
System.Text.RegularExpressions.Generator (2)
RegexGenerator.Parser.cs (2)
124nullableRegex = regexMethodSymbol.ReturnNullableAnnotation == NullableAnnotation.Annotated; 138nullableRegex = regexPropertySymbol.NullableAnnotation == NullableAnnotation.Annotated;