141 references to System_Nullable_T
ConfigurationSchemaGenerator (3)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (2)
223unboundGeneric.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 542if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
RuntimeSource\SourceGenerators\TypeRef.cs (1)
36public bool CanBeNull => !IsValueType || SpecialType is SpecialType.System_Nullable_T;
ILLink.RoslynAnalyzer (2)
ITypeSymbolExtensions.cs (1)
72 SpecialType.System_Nullable_T => WellKnownType.System_Nullable_T,
TrimAnalysis\SingleValueExtensions.cs (1)
16 if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) {
Microsoft.Analyzers.Extra (2)
CoalesceAnalyzer.cs (2)
37&& type.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T) 64&& type.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T)
Microsoft.AspNetCore.App.Analyzers (2)
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (1)
131if (parameterTypeSymbol!.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
34if (unwrapNullable && unwrappedTypeSymbol?.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (3)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
34if (unwrapNullable && unwrappedTypeSymbol?.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T)
StaticRouteHandlerModel\Model\EndpointParameterExtensions.cs (2)
44if (handlerParameterType is INamedTypeSymbol { IsGenericType: true, OriginalDefinition: { SpecialType: not SpecialType.System_Nullable_T } }) 58=> typeSymbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.CodeAnalysis (12)
Operations\ControlFlowGraphBuilder.cs (1)
3129if (operation.Target?.Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T &&
SpecialMembers.cs (9)
1051(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1058(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1066(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1073(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1080(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1088(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1091(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Nullable_T, 1096(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1100(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Nullable_T,
SpecialTypeExtensions.cs (1)
83case SpecialType.System_Nullable_T:
Symbols\ITypeSymbol.cs (1)
205return typeOpt?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.CodeAnalysis.CodeStyle (6)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (2)
154if (type is not INamedTypeSymbol namedType || namedType.ConstructedFrom.SpecialType != SpecialType.System_Nullable_T) 182var whenPartIsNullable = whenPartType?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
89var whenPartIsNullable = semanticModel.GetTypeInfo(whenPartMatch).Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (1)
83case SpecialType.System_Nullable_T:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
62=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
170type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T ||
Microsoft.CodeAnalysis.CSharp (20)
Binder\Binder_Expressions.cs (4)
2569NamedTypeSymbol nullableType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, node); 2649NamedTypeSymbol nullableType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, node); 2676NamedTypeSymbol nullableType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, operand); 11025accessType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, node).Construct(accessType);
Binder\Binder_TupleOperators.cs (1)
420NamedTypeSymbol nullableT = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, syntax);
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
882var nullable = this.corLibrary.GetDeclaredSpecialType(SpecialType.System_Nullable_T);
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
20return Compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type);
Compilation\CSharpCompilation.cs (1)
1703constructedNullableInstance = this.GetSpecialType(SpecialType.System_Nullable_T).Construct(typeArgument);
FlowAnalysis\NullableWalker.cs (3)
8509Debug.Assert(containingType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T); 9544return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(underlying)); 10808if ((object)getMethod != null && getMethod.ContainingType.SpecialType == SpecialType.System_Nullable_T)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
105_nullableType = _bound.SpecialType(SpecialType.System_Nullable_T);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
393Debug.Assert(enumeratorType.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (2)
643type = _compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type); 966type = _compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type);
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
476if ((ContainingType.SpecialType == SpecialType.System_Nullable_T)
Symbols\TypeSymbolExtensions.cs (2)
141return type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 160&& nt.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
Symbols\TypeWithAnnotations.cs (2)
223=> Create(compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(typeSymbol))); 1203_compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(_underlying)) :
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1127else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1134return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol);
Microsoft.CodeAnalysis.CSharp.Features (4)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
525ContainingType: not { SpecialType: SpecialType.System_Nullable_T }
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
165originalDefinition.SpecialType == SpecialType.System_Nullable_T)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
114if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (1)
66if (namedType.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T &&
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\NullableConversionTests.cs (1)
812var nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(compilation.GetSpecialType(SpecialType.System_Int32));
Semantics\NullableTests.cs (2)
2212comp.MakeTypeMissing(SpecialType.System_Nullable_T); 2245comp.MakeTypeMissing(SpecialType.System_Nullable_T);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (17)
Compilation\CompilationAPITests.cs (2)
2790var nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).GetPublicSymbol().Construct(intType); 2980var nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).GetPublicSymbol().Construct(intType);
Compilation\SemanticModelAPITests.cs (2)
3923var type1 = comp.GetSpecialType(SpecialType.System_Nullable_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 3930var type2 = comp.GetSpecialType(SpecialType.System_Nullable_T).Construct(comp.GetSpecialType(SpecialType.System_Int32));
Symbols\Metadata\PE\DynamicTransformsTests.cs (1)
373var nullableStruct = _assembly.CorLibrary.GetSpecialType(SpecialType.System_Nullable_T).Construct(structType);
Symbols\MissingSpecialMember.cs (3)
235var specialType = comp.GetSpecialType(SpecialType.System_Nullable_T); 237Assert.Equal(SpecialType.System_Nullable_T, specialType.SpecialType); 241Assert.Equal(SpecialType.System_Nullable_T, lookupType.SpecialType);
Symbols\TypeTests.cs (9)
1481Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), varX.Type.OriginalDefinition); 1508Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1526Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1551Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1619Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1644Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1691Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1707Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1769Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Recommendations\CSharpRecommendationServiceRunner_Conversions.cs (1)
148? compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(container)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1127else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1134return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol);
Microsoft.CodeAnalysis.Features (5)
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (1)
68if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
55if (type is { IsReferenceType: true } or { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T })
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (2)
154if (type is not INamedTypeSymbol namedType || namedType.ConstructedFrom.SpecialType != SpecialType.System_Nullable_T) 182var whenPartIsNullable = whenPartType?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
89var whenPartIsNullable = semanticModel.GetTypeInfo(whenPartMatch).Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.CodeAnalysis.VisualBasic (9)
Binding\Binder_Conversions.vb (2)
389Dim nullableOfT As NamedTypeSymbol = Compilation.GetSpecialType(SpecialType.System_Nullable_T) 390intermediateTargetType = Compilation.GetSpecialType(SpecialType.System_Nullable_T).
Binding\Binder_Expressions.vb (1)
972resultType = GetSpecialType(SpecialType.System_Nullable_T, expr.Syntax, diagnostics).Construct(resultType)
Binding\Binder_Utils.vb (1)
295Dim nullableType As NamedTypeSymbol = DirectCast(GetSpecialType(SpecialType.System_Nullable_T, syntax, diagBag), NamedTypeSymbol)
Semantics\Conversions.vb (1)
1481Dim nullableOfT As NamedTypeSymbol = booleanType.ContainingAssembly.GetSpecialType(SpecialType.System_Nullable_T)
Semantics\Operators.vb (3)
429ElseIf If(containingType.SpecialType = SpecialType.System_Nullable_T, 470If containingType.SpecialType = SpecialType.System_Nullable_T Then 3163Dim nullableOfT As NamedTypeSymbol = opSet(0).ContainingAssembly.GetSpecialType(SpecialType.System_Nullable_T)
Symbols\TypeSymbolExtensions.vb (1)
15Return this.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (2)
319DirectCast(castExpressionType.OriginalDefinition, ITypeSymbol).SpecialType = SpecialType.System_Nullable_T 403If castType.OriginalDefinition?.SpecialType = SpecialType.System_Nullable_T Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
48elementType.OriginalDefinition.SpecialType <> SpecialType.System_Nullable_T Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
81If symbol.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
505New TypeInferenceInfo(Me.Compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(t.InferredType)), 511If t.InferredType.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (5)
Compilation\CompilationAPITests.vb (2)
1818Dim nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(intType) 1861Dim nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(intType)
Semantics\Conversions.vb (3)
361Dim nullableType = c1.GetSpecialType(System_Nullable_T) 1127Dim nullableType = c1.GetSpecialType(System_Nullable_T) 2042Dim nullable = c1.GetSpecialType(System_Nullable_T)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (6)
SymbolsTests\Metadata\PE\LoadingOperators.vb (1)
2800Dim nullable = compilation.GetSpecialType(SpecialType.System_Nullable_T)
SymbolsTests\Source\FieldTests.vb (1)
113Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Nullable_T), fieldP.Type.OriginalDefinition)
SymbolsTests\Source\TypeBindingTests.vb (1)
89Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Nullable_T), namedTypeA.OriginalDefinition)
SymbolsTests\WellKnownTypeValidationTests.vb (3)
121Dim special = comp.GetSpecialType(SpecialType.System_Nullable_T) 123Assert.Equal(SpecialType.System_Nullable_T, special.SpecialType) 127Assert.Equal(SpecialType.System_Nullable_T, lookup.SpecialType)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (2)
319DirectCast(castExpressionType.OriginalDefinition, ITypeSymbol).SpecialType = SpecialType.System_Nullable_T 403If castType.OriginalDefinition?.SpecialType = SpecialType.System_Nullable_T Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
48elementType.OriginalDefinition.SpecialType <> SpecialType.System_Nullable_T Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
81If symbol.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
505New TypeInferenceInfo(Me.Compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(t.InferredType)), 511If t.InferredType.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then
Microsoft.CodeAnalysis.Workspaces (4)
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (1)
200if (symbol is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T, TypeArguments: [var valueType] })
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (1)
83case SpecialType.System_Nullable_T:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
62=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
170type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T ||
Microsoft.Extensions.Options.SourceGeneration (7)
Parser.cs (4)
242if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 270if (modelType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 637if (typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 687if (mt.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
ParserUtilities.cs (3)
76if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 108=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.Logging (3)
Parsing\TypeSymbolExtensions.cs (1)
95if (sym is INamedTypeSymbol namedTypeSymbol && namedTypeSymbol.IsGenericType && namedTypeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.Logging.Unit.Tests (1)
LogParserUtilitiesTests.cs (1)
24typeSymbolMock.SetupGet(x => x.SpecialType).Returns(SpecialType.System_Nullable_T);
Microsoft.Gen.Metrics (2)
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.MetricsReports (2)
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSManagedTypeInfo.cs (1)
102case INamedTypeSymbol { ConstructedFrom.SpecialType: SpecialType.System_Nullable_T } nullable:
Microsoft.VisualStudio.LanguageServices (1)
Library\VsNavInfo\NavInfoFactory.cs (1)
77if (typeSymbol.SpecialType == SpecialType.System_Nullable_T)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
541if (symbol is ITypeSymbol type && type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
System.Text.Json.SourceGeneration (3)
Helpers\RoslynExtensions.cs (2)
199=> !type.IsValueType || type.OriginalDefinition.SpecialType is SpecialType.System_Nullable_T; 203if (type.IsValueType && type is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T })
src\libraries\Common\src\SourceGenerators\TypeRef.cs (1)
36public bool CanBeNull => !IsValueType || SpecialType is SpecialType.System_Nullable_T;