3 implementations of OriginalDefinition
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
78ITypeSymbol ITypeSymbol.OriginalDefinition
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
132ITypeSymbol ITypeSymbol.OriginalDefinition => _symbol.OriginalDefinition;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
563Private ReadOnly Property ITypeSymbol_OriginalDefinition As ITypeSymbol Implements ITypeSymbol.OriginalDefinition
200 references to OriginalDefinition
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
542if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
ILLink.RoslynAnalyzer (3)
TrimAnalysis\HandleCallAction.cs (1)
90 ITypeSymbol? staticTypeDef = staticType?.OriginalDefinition;
TrimAnalysis\ReflectionAccessAnalyzer.cs (1)
29 typeSymbol = typeSymbol.OriginalDefinition;
TrimAnalysis\SingleValueExtensions.cs (1)
16 if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) {
Microsoft.Analyzers.Extra (4)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
130var returnType = operation.Type?.OriginalDefinition;
AsyncMethodWithoutCancellation.cs (1)
116var returnType = method.ReturnType.OriginalDefinition;
CoalesceAnalyzer.cs (2)
37&& type.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T) 64&& type.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T)
Microsoft.AspNetCore.App.Analyzers (2)
Http\RequestDelegateReturnTypeAnalyzer.cs (2)
38if (SymbolEqualityComparer.Default.Equals(returnType.OriginalDefinition, wellKnownTypes.Get(WellKnownType.System_Threading_Tasks_Task_T))) 64if (returnType != null && SymbolEqualityComparer.Default.Equals(returnType.OriginalDefinition, wellKnownTypes.Get(WellKnownType.System_Threading_Tasks_Task_T)))
Microsoft.AspNetCore.Http.RequestDelegateGenerator (5)
StaticRouteHandlerModel\EndpointResponse.cs (4)
53if (returnType.OriginalDefinition.Equals(taskOfT, SymbolEqualityComparer.Default) || 54returnType.OriginalDefinition.Equals(valueTaskOfT, SymbolEqualityComparer.Default)) 61if (returnType.OriginalDefinition.Equals(task, SymbolEqualityComparer.Default) || 62returnType.OriginalDefinition.Equals(valueTask, SymbolEqualityComparer.Default))
StaticRouteHandlerModel\Model\EndpointParameterExtensions.cs (1)
58=> typeSymbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.CodeAnalysis (3)
Operations\ControlFlowGraphBuilder.cs (1)
3129if (operation.Target?.Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T &&
Symbols\ITypeSymbol.cs (2)
86/// symbol by type substitution then <see cref="OriginalDefinition"/> gets the original symbol as it was defined in 205return typeOpt?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.CodeAnalysis.CodeStyle (16)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
159collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T ||
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
115if (!nullableType.Equals(type.Type?.OriginalDefinition))
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IMethodSymbolExtensions.cs (2)
107methodSymbol.ReturnType.OriginalDefinition.Equals(taskType) || 108methodSymbol.ReturnType.OriginalDefinition.Equals(genericTaskType));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
651container: typeSymbol ?? methodSymbol!.ReturnType.OriginalDefinition,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
373var originalThroughType = throughType?.OriginalDefinition;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (7)
62=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 180var originalBaseType = baseType.OriginalDefinition; 181type = type.OriginalDefinition; 189return baseTypes.Contains(t => SymbolEquivalenceComparer.Instance.Equals(t.OriginalDefinition, originalBaseType)); 197var originalBaseType = baseType.OriginalDefinition; 219var originalInterfaceType = interfaceType.OriginalDefinition; 419if (typeSymbol.OriginalDefinition.Equals(expressionOfT))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
170type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T ||
Microsoft.CodeAnalysis.CodeStyle.Fixes (8)
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (6)
110|| returnType.OriginalDefinition.Equals(knownTypes.TaskOfTType) 111|| returnType.OriginalDefinition.Equals(knownTypes.ValueTaskOfTType); 114=> returnType.OriginalDefinition.Equals(knownTypes.TaskType) 115|| returnType.OriginalDefinition.Equals(knownTypes.ValueTaskType); 217if (returnType.OriginalDefinition.Equals(knownTypes.TaskType)) 233if (returnType.OriginalDefinition.Equals(knownTypes.TaskOfTType))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\KnownTypes.cs (2)
28if (returnType.OriginalDefinition.Equals(this.TaskOfTType)) 31if (returnType.OriginalDefinition.Equals(this.ValueTaskOfTType))
Microsoft.CodeAnalysis.CSharp.CodeStyle (18)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (1)
101var ienumerableType = convertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
243if (!Equals(argumentType.OriginalDefinition, ienumerableOfTType) &&
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
60if (!Equals(compilation.IEnumerableOfTType(), parameter.Type.OriginalDefinition))
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (10)
119if (!IsConstructibleCollectionType(compilation, originalTypeInfo.ConvertedType.OriginalDefinition)) 197convertedType.OriginalDefinition.Equals(compilation.ReadOnlySpanOfTType()); 201convertedType.OriginalDefinition.Equals(compilation.SpanOfTType()); 210type.OriginalDefinition.Equals(compilation.SpanOfTType()) && 237Equals(type.OriginalDefinition, compilation.ListOfTType()) && 296return type.OriginalDefinition.SpecialType 304return type.OriginalDefinition.SpecialType 884var collectionBuilderAttributeData = createMethod.ReturnType.OriginalDefinition 890if (!factoryType.OriginalDefinition.Equals(collectionBuilderType.OriginalDefinition)) 1057if (type.OriginalDefinition.Equals(interfaceType))
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
74if (Equals(firstParameter.Type.OriginalDefinition, ienumerableOfTType) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
1044if (collectionTargetType.OriginalDefinition.Equals(ienumerableType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
442if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
797if (expressionType.Equals(typeInfo.ConvertedType?.OriginalDefinition)) 826expressionType.Equals(method.Parameters[0].Type?.OriginalDefinition))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (9)
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (4)
61if (returnType.OriginalDefinition.Equals(knownTypes.TaskType)) 66else if (returnType.OriginalDefinition.Equals(knownTypes.TaskOfTType)) 71else if (returnType.OriginalDefinition.Equals(knownTypes.IAsyncEnumerableOfTType) && 77else if (returnType.OriginalDefinition.Equals(knownTypes.IAsyncEnumeratorOfTType) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (5)
1127else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1990if (type.OriginalDefinition.Equals(this.Compilation.TaskOfTType()) || type.OriginalDefinition.Equals(this.Compilation.ValueTaskOfTType())) 1996if (type.OriginalDefinition.Equals(this.Compilation.TaskType()) || type.OriginalDefinition.Equals(this.Compilation.ValueTaskType()))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenLocalFunctionTests.cs (2)
3167Assert.Equal(goo.Parameters[0].Type.OriginalDefinition, bar.Parameters[0].Type.OriginalDefinition);
Microsoft.CodeAnalysis.CSharp.Features (24)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
114if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
354=> Equals(typeSymbol?.OriginalDefinition, semanticModel.Compilation.ListOfTType());
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (4)
372=> Equals(typeSymbol.OriginalDefinition, _semanticModel.Compilation.GetTypeByMetadataName(typeof(List<>).FullName)); 555if (returnTypeInfo.Type.OriginalDefinition?.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 561if (returnTypeInfo.ConvertedType.OriginalDefinition?.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 747if (methodSymbol.ReturnType.OriginalDefinition?.SpecialType != SpecialType.System_Collections_Generic_IEnumerable_T)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (1)
101var ienumerableType = convertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
243if (!Equals(argumentType.OriginalDefinition, ienumerableOfTType) &&
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
60if (!Equals(compilation.IEnumerableOfTType(), parameter.Type.OriginalDefinition))
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (10)
119if (!IsConstructibleCollectionType(compilation, originalTypeInfo.ConvertedType.OriginalDefinition)) 197convertedType.OriginalDefinition.Equals(compilation.ReadOnlySpanOfTType()); 201convertedType.OriginalDefinition.Equals(compilation.SpanOfTType()); 210type.OriginalDefinition.Equals(compilation.SpanOfTType()) && 237Equals(type.OriginalDefinition, compilation.ListOfTType()) && 296return type.OriginalDefinition.SpecialType 304return type.OriginalDefinition.SpecialType 884var collectionBuilderAttributeData = createMethod.ReturnType.OriginalDefinition 890if (!factoryType.OriginalDefinition.Equals(collectionBuilderType.OriginalDefinition)) 1057if (type.OriginalDefinition.Equals(interfaceType))
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
74if (Equals(firstParameter.Type.OriginalDefinition, ienumerableOfTType) ||
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (4)
61if (returnType.OriginalDefinition.Equals(knownTypes.TaskType)) 66else if (returnType.OriginalDefinition.Equals(knownTypes.TaskOfTType)) 71else if (returnType.OriginalDefinition.Equals(knownTypes.IAsyncEnumerableOfTType) && 77else if (returnType.OriginalDefinition.Equals(knownTypes.IAsyncEnumeratorOfTType) &&
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (11)
977Assert.Equal<ISymbol>(enumSymbol, mSymbol.ReturnType.OriginalDefinition); 985Assert.Equal<ISymbol>(structSymbol, mSymbol.Parameters[1].Type.OriginalDefinition); 4009Assert.Equal(typeA, boundType.OriginalDefinition); 4015Assert.Equal(typeA, boundType.OriginalDefinition); 4021Assert.Equal(typeA, boundType.OriginalDefinition); 4027Assert.Equal(typeB, boundType.OriginalDefinition); 4033Assert.Equal(typeB, boundType.OriginalDefinition); 4039Assert.Equal(typeB, boundType.OriginalDefinition); 4045Assert.Equal(typeB, boundType.OriginalDefinition); 4056Assert.Equal(typeB, boundType.OriginalDefinition); 4062Assert.Equal(typeB, boundType.OriginalDefinition);
Symbols\TypeTests.cs (1)
1769Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition);
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
1044if (collectionTargetType.OriginalDefinition.Equals(ienumerableType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
442if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
797if (expressionType.Equals(typeInfo.ConvertedType?.OriginalDefinition)) 826expressionType.Equals(method.Parameters[0].Type?.OriginalDefinition))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (5)
1127else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1990if (type.OriginalDefinition.Equals(this.Compilation.TaskOfTType()) || type.OriginalDefinition.Equals(this.Compilation.ValueTaskOfTType())) 1996if (type.OriginalDefinition.Equals(this.Compilation.TaskType()) || type.OriginalDefinition.Equals(this.Compilation.ValueTaskType()))
Microsoft.CodeAnalysis.Features (16)
Completion\Providers\AbstractAwaitCompletionProvider.cs (1)
74var originalDefinition = symbol.OriginalDefinition;
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
55if (type is { IsReferenceType: true } or { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T })
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (2)
254if (collectionType.OriginalDefinition.Equals(model.Compilation.GetTypeByMetadataName(typeof(ImmutableArray<>).FullName!))) 279if (collectionType.TypeKind == TypeKind.Interface && knownCollectionInterfaces.Contains(collectionType.OriginalDefinition))
ExtractMethod\MethodExtractor.Analyzer.cs (2)
240var originalDefinition = returnType.OriginalDefinition; 859if (type.OriginalDefinition.Equals(type))
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
159collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T ||
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
115if (!nullableType.Equals(type.Type?.OriginalDefinition))
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
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\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (6)
110|| returnType.OriginalDefinition.Equals(knownTypes.TaskOfTType) 111|| returnType.OriginalDefinition.Equals(knownTypes.ValueTaskOfTType); 114=> returnType.OriginalDefinition.Equals(knownTypes.TaskType) 115|| returnType.OriginalDefinition.Equals(knownTypes.ValueTaskType); 217if (returnType.OriginalDefinition.Equals(knownTypes.TaskType)) 233if (returnType.OriginalDefinition.Equals(knownTypes.TaskOfTType))
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
563Private ReadOnly Property ITypeSymbol_OriginalDefinition As ITypeSymbol Implements ITypeSymbol.OriginalDefinition
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (2)
1077If expressionTypeOpt.Equals(typeInfo.ConvertedType?.OriginalDefinition) Then 1091expressionTypeOpt.Equals(method.Parameters(0).Type.OriginalDefinition) Then
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 (6)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (2)
59If methodSymbol.ReturnType.OriginalDefinition.Equals(knownTypes.TaskOfTType) Then 64ElseIf Equals(methodSymbol.ReturnType.OriginalDefinition, knownTypes.TaskType) Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
48elementType.OriginalDefinition.SpecialType <> SpecialType.System_Nullable_T Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
746taskOfT IsNot Nothing AndAlso Equals(memberMethod.ReturnType.OriginalDefinition, taskOfT) AndAlso typeArguments.Any(), 773If memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 774memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerator_T Then
Microsoft.CodeAnalysis.VisualBasic.Features (2)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (2)
59If methodSymbol.ReturnType.OriginalDefinition.Equals(knownTypes.TaskOfTType) Then 64ElseIf Equals(methodSymbol.ReturnType.OriginalDefinition, knownTypes.TaskType) Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
DocumentationComments\DocCommentTests.vb (1)
12078Assert.Equal(expected, expTypeInfo.Type.OriginalDefinition)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (10)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (2)
100Not returnType.Equals(taskType) AndAlso Not returnType.OriginalDefinition.Equals(taskOfT) Then 132Select Case returnType.OriginalDefinition.SpecialType
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (2)
1077If expressionTypeOpt.Equals(typeInfo.ConvertedType?.OriginalDefinition) Then 1091expressionTypeOpt.Equals(method.Parameters(0).Type.OriginalDefinition) Then
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\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
746taskOfT IsNot Nothing AndAlso Equals(memberMethod.ReturnType.OriginalDefinition, taskOfT) AndAlso typeArguments.Any(), 773If memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 774memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerator_T Then
Microsoft.CodeAnalysis.Workspaces (19)
Recommendations\AbstractRecommendationServiceRunner.cs (3)
417if (!MatchesConstraints(containerType.OriginalDefinition, parameterType.ConstraintTypes)) 436if (MatchesConstraint(originalContainerType, constraintType.OriginalDefinition)) 515if (SymbolEqualityComparer.Default.Equals(current.OriginalDefinition, matched))
Shared\Extensions\ITypeSymbolExtensions.cs (2)
178if (type.OriginalDefinition is { SpecialType: SpecialType.System_Collections_Generic_IEnumerable_T or SpecialType.System_Collections_IEnumerable }) 197type.OriginalDefinition.Equals(asyncEnumerableType, SymbolEqualityComparer.Default))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IMethodSymbolExtensions.cs (2)
107methodSymbol.ReturnType.OriginalDefinition.Equals(taskType) || 108methodSymbol.ReturnType.OriginalDefinition.Equals(genericTaskType));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
651container: typeSymbol ?? methodSymbol!.ReturnType.OriginalDefinition,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
373var originalThroughType = throughType?.OriginalDefinition;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (7)
62=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 180var originalBaseType = baseType.OriginalDefinition; 181type = type.OriginalDefinition; 189return baseTypes.Contains(t => SymbolEquivalenceComparer.Instance.Equals(t.OriginalDefinition, originalBaseType)); 197var originalBaseType = baseType.OriginalDefinition; 219var originalInterfaceType = interfaceType.OriginalDefinition; 419if (typeSymbol.OriginalDefinition.Equals(expressionOfT))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
170type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\KnownTypes.cs (2)
28if (returnType.OriginalDefinition.Equals(this.TaskOfTType)) 31if (returnType.OriginalDefinition.Equals(this.ValueTaskOfTType))
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SymbolKeyTests.cs (1)
1296var id = SymbolKey.CreateString(symbol.OriginalDefinition);
Microsoft.Extensions.Options.SourceGeneration (7)
Parser.cs (5)
242if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 249if (SymbolEqualityComparer.Default.Equals(type.OriginalDefinition, _symbolHolder.GenericIEnumerableSymbol)) 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 (2)
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 (2)
Parsing\TypeSymbolExtensions.cs (1)
72typeSymbol.OriginalDefinition.SpecialType != SpecialType.None ||
src\Generators\Shared\ParserUtilities.cs (1)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.Logging.Unit.Tests (3)
LogParserUtilitiesTests.cs (3)
30anotherTypeSymbolMock.SetupGet(x => x.OriginalDefinition).Returns(typeSymbolMock.Object); 40typeSymbolMock.SetupGet(x => x.OriginalDefinition).Returns(typeSymbolMock.Object); 157paramTypeMock.SetupGet(x => x.OriginalDefinition).Returns(paramTypeMock.Object);
Microsoft.Gen.Metrics (2)
Parser.cs (1)
721specialType = typeSymbol.OriginalDefinition.SpecialType;
src\Generators\Shared\ParserUtilities.cs (1)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
721specialType = typeSymbol.OriginalDefinition.SpecialType;
src\Generators\Shared\ParserUtilities.cs (1)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (2)
998if (SymbolEqualityComparer.Default.Equals(spanTypeMaybe.OriginalDefinition, _spanOfT) || SymbolEqualityComparer.Default.Equals(spanTypeMaybe.OriginalDefinition, _readOnlySpanOfT))
Microsoft.VisualStudio.LanguageServices (1)
Library\VsNavInfo\NavInfoFactory.cs (1)
95typeSymbol = typeSymbol.OriginalDefinition;
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
546if (symbol is ITypeSymbol type && type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
System.Text.Json.SourceGeneration (4)
Helpers\RoslynExtensions.cs (1)
199=> !type.IsValueType || type.OriginalDefinition.SpecialType is SpecialType.System_Nullable_T;
JsonSourceGenerator.Parser.cs (2)
755if (SymbolEqualityComparer.Default.Equals(type.OriginalDefinition, _knownSymbols.MemoryType)) 763if (SymbolEqualityComparer.Default.Equals(type.OriginalDefinition, _knownSymbols.ReadOnlyMemoryType))
src\libraries\Common\src\SourceGenerators\TypeRef.cs (1)
22SpecialType = type.OriginalDefinition.SpecialType;