5 implementations of IsGenericType
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
76public abstract bool IsGenericType { get; }
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\NamedTypeSymbol.cs (1)
185bool INamedTypeSymbol.IsGenericType => UnderlyingNamedTypeSymbol.IsGenericType;
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
57public bool IsGenericType => _symbol.IsGenericType;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
939Public ReadOnly Property IsGenericType As Boolean Implements INamedTypeSymbol.IsGenericType, INamedTypeSymbolInternal.IsGenericType
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
76public abstract bool IsGenericType { get; }
65 references to IsGenericType
ConfigurationSchemaGenerator (8)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (5)
221if (type is INamedTypeSymbol { IsGenericType: true } genericType && 805if (@interface.IsGenericType) 808candidate.IsGenericType && 823if (type.IsGenericType) 834if (type is not INamedTypeSymbol { IsGenericType: true } genericType)
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (1)
105if (type is not INamedTypeSymbol { IsGenericType: true } namedType)
RuntimeSource\Configuration.Binder\Parser\OptionsBuilderConfigurationExtensions.cs (1)
22@params[0].Type is not INamedTypeSymbol { IsGenericType: true } genericType ||
RuntimeSource\SourceGenerators\TypeModelHelper.cs (1)
15if (!type.IsGenericType)
ILLink.RoslynAnalyzer (5)
TrimAnalysis\GenericArgumentDataFlow.cs (5)
17 while (type is { IsGenericType: true }) { 54 if (typeArgument is INamedTypeSymbol namedTypeArgument && namedTypeArgument.IsGenericType) 61 while (type is { IsGenericType: true }) { 66 if (typeArgument is INamedTypeSymbol namedTypeSymbol && namedTypeSymbol.IsGenericType 84 if (typeArgument is INamedTypeSymbol namedTypeSymbol && namedTypeSymbol.IsGenericType
Microsoft.AspNetCore.App.Analyzers (2)
RouteHandlers\DisallowReturningActionResultFromMapMethods.cs (1)
91if (returnType is not INamedTypeSymbol { Name: "Task" or "ValueTask", IsGenericType: true, TypeArguments: { Length: 1 } } taskLike)
src\Shared\Roslyn\MvcFacts.cs (1)
38if (type.IsGenericType || type.IsUnboundGenericType)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\Model\EndpointParameterExtensions.cs (1)
44if (handlerParameterType is INamedTypeSymbol { IsGenericType: true, OriginalDefinition: { SpecialType: not SpecialType.System_Nullable_T } })
Microsoft.AspNetCore.Mvc.Analyzers (1)
src\Shared\Roslyn\MvcFacts.cs (1)
38if (type.IsGenericType || type.IsUnboundGenericType)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
src\Shared\Roslyn\MvcFacts.cs (1)
38if (type.IsGenericType || type.IsUnboundGenericType)
Microsoft.CodeAnalysis (1)
DocumentationCommentId.cs (1)
587if (symbol.IsGenericType)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
185return classOrStructType.IsGenericType
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (1)
148else if (symbolInfo.Symbol is INamedTypeSymbol { IsValueType: true, IsGenericType: false })
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
395if (delegateContainingType is null || !delegateContainingType.IsGenericType)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (1)
200if (typeToGenerateIn.IsGenericType)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
65conversion.Type is INamedTypeSymbol { IsGenericType: true } namedType &&
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (1)
148else if (symbolInfo.Symbol is INamedTypeSymbol { IsValueType: true, IsGenericType: false })
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
395if (delegateContainingType is null || !delegateContainingType.IsGenericType)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (1)
200if (typeToGenerateIn.IsGenericType)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
65conversion.Type is INamedTypeSymbol { IsGenericType: true } namedType &&
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\GetSemanticInfoTests.cs (5)
1390return (INamedTypeSymbol)comp.GlobalNamespace.GetMember<INamespaceSymbol>("System").GetMembers("Action").Where(s => !((INamedTypeSymbol)s).IsGenericType).Single(); 5406Assert.False(type.IsGenericType); 5412Assert.False(type.IsGenericType); 5418Assert.True(type.IsGenericType); 5426Assert.True(type.IsGenericType);
Microsoft.CodeAnalysis.Features (4)
FullyQualify\AbstractFullyQualifyService.cs (1)
268=> symbol.ContainingSymbol is INamespaceSymbol or INamedTypeSymbol { IsGenericType: false };
FullyQualify\AbstractFullyQualifyService.SymbolResult.cs (2)
48Debug.Assert(Symbol is INamespaceSymbol || !((INamedTypeSymbol)Symbol).IsGenericType); 49Debug.Assert(other.Symbol is INamespaceSymbol || !((INamedTypeSymbol)other.Symbol).IsGenericType);
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
57public bool IsGenericType => _symbol.IsGenericType;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
939Public ReadOnly Property IsGenericType As Boolean Implements INamedTypeSymbol.IsGenericType, INamedTypeSymbolInternal.IsGenericType
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (1)
146If typeToGenerateIn.IsGenericType Then
Microsoft.CodeAnalysis.VisualBasic.Features (1)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (1)
146If typeToGenerateIn.IsGenericType Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (1)
179Debug.Assert(genericType.IsGenericType)
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
185return classOrStructType.IsGenericType
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
214if (mt.IsGenericType)
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
124=> attributeType.IsGenericType ?
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
124=> attributeType.IsGenericType ?
Microsoft.Gen.Logging (2)
Parsing\TypeSymbolExtensions.cs (1)
95if (sym is INamedTypeSymbol namedTypeSymbol && namedTypeSymbol.IsGenericType && namedTypeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
src\Generators\Shared\GeneratorUtilities.cs (1)
124=> attributeType.IsGenericType ?
Microsoft.Gen.Metrics (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
124=> attributeType.IsGenericType ?
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
124=> attributeType.IsGenericType ?
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSMarshalAsAttributeInfoParser.cs (2)
21public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.IsGenericType && SymbolEqualityComparer.Default.Equals(_jsMarshalAsAttribute, attributeType.ConstructUnboundGenericType()); 27if (jsTypeArgs.IsGenericType)
Microsoft.Interop.SourceGeneration (2)
ManualTypeMarshallingHelper.cs (2)
85return entryPointType.IsGenericType 358if (!entryType.IsGenericType)
Microsoft.Maui.Controls.BindingSourceGen (1)
ITypeSymbolExtensions.cs (1)
29 && namedTypeSymbol.IsGenericType
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphBuilder.cs (1)
359if (typeSymbol.IsGenericType)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ObjectBrowser\DescriptionBuilder.cs (2)
57if (typeSymbol.IsGenericType) 123if (typeSymbol.IsGenericType)
System.Text.Json.SourceGeneration (8)
Helpers\KnownTypeSymbols.cs (2)
267if (type is not INamedTypeSymbol { IsGenericType: true, ConstructedFrom: INamedTypeSymbol genericTypeDef }) 320if (type is not INamedTypeSymbol { IsGenericType: true, ConstructedFrom: INamedTypeSymbol genericTypeDef })
Helpers\RoslynExtensions.cs (4)
74else if (namedType.IsGenericType) 84if (containingType?.IsGenericType == true) 183return candidate.IsGenericType && SymbolEqualityComparer.Default.Equals(candidate.ConstructedFrom, baseType); 188=> type is INamedTypeSymbol { IsGenericType: true } namedType && SymbolEqualityComparer.Default.Equals(namedType, namedType.ConstructedFrom);
JsonSourceGenerator.Parser.cs (1)
1693if (type is not INamedTypeSymbol namedType || !namedType.IsGenericType)
src\libraries\Common\src\SourceGenerators\TypeModelHelper.cs (1)
15if (!type.IsGenericType)