64 references to IsGenericType
Microsoft.CodeAnalysis.CSharp (44)
Binder\Binder_Symbols.cs (1)
1622
if ((object)namedTypeRight != null && namedTypeRight.
IsGenericType
)
Binder\ForEachLoopBinder.cs (1)
895
if (collectionType.
IsGenericType
)
Compilation\CSharpCompilation.cs (2)
1773
if (mainType is null || mainType.
IsGenericType
|| (mainType.TypeKind != TypeKind.Class && mainType.TypeKind != TypeKind.Struct && !mainType.IsInterface))
1829
if (candidate.IsGenericMethod || candidate.ContainingType.
IsGenericType
)
Emitter\NoPia\EmbeddedType.cs (1)
35
Debug.Assert(!underlyingNamedType.AdaptedNamedTypeSymbol.
IsGenericType
);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
291
if (namedType.
IsGenericType
)
FlowAnalysis\NullableWalker.cs (2)
7362
if (!symbolContainer.
IsGenericType
)
7367
if (!containingType.
IsGenericType
)
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (2)
350
if (builderType.IsUnboundGenericType && builderType.ContainingType?.
IsGenericType
!= true && builderType.Arity == 1)
361
if (!builderType.
IsGenericType
)
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
730
return _currentDynamicCallSiteContainer.
IsGenericType
? field.AsMember(_currentDynamicCallSiteContainer) : field;
Symbols\BaseTypeAnalysis.cs (1)
282
bool hasGenerics = type.
IsGenericType
;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (2)
226
if ((object)containingType != null && containingType.
IsGenericType
)
234
Debug.Assert(newContainingType.
IsGenericType
);
Symbols\Metadata\PE\MetadataDecoder.cs (1)
372
Debug.Assert(candidate?.
IsGenericType
!= true);
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
111
if (!type.
IsGenericType
)
Symbols\Metadata\PE\SymbolFactory.cs (1)
164
return ((object)namedType != null && namedType.
IsGenericType
) ? namedType.AsUnboundGenericType() : type;
Symbols\Metadata\PE\TupleTypeDecoder.cs (2)
261
if (containingType is object && containingType.
IsGenericType
)
264
Debug.Assert(decodedContainingType.
IsGenericType
);
Symbols\MethodSymbol.cs (1)
1037
if (isGenericMethod(this) || ContainingType.
IsGenericType
)
Symbols\NamedTypeSymbol.cs (5)
935
if (!
IsGenericType
)
969
if (!
IsGenericType
)
1005
if (!
IsGenericType
)
1044
Debug.Assert(typeA.
IsGenericType
);
1150
if (!this.
IsGenericType
)
Symbols\PublicModel\NamedTypeSymbol.cs (1)
185
bool INamedTypeSymbol.IsGenericType => UnderlyingNamedTypeSymbol.
IsGenericType
;
Symbols\Retargeting\RetargetingSymbolTranslator.cs (2)
494
if (newDefinition.Kind == SymbolKind.ErrorType && !newDefinition.
IsGenericType
)
1002
if (!method.IsGenericMethod && !retargetedType.
IsGenericType
)
Symbols\Source\SourceConstructorSymbolBase.cs (1)
75
if (_lazyIsVararg && (IsGenericMethod || ContainingType.
IsGenericType
|| _lazyParameters.Length > 0 && _lazyParameters[_lazyParameters.Length - 1].IsParams))
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5096
bool containsExtensionMethods = ((this.IsStatic && !this.
IsGenericType
) || this.IsScriptClass) && this.declaration.ContainsExtensionMethods;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
1687
if (!this.
IsGenericType
)
1716
if (interface1.
IsGenericType
&& interface2.
IsGenericType
&&
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
783
if (isAnyNestedMethodGeneric || ContainingType?.
IsGenericType
== true)
912
if (IsGenericMethod || ContainingType.
IsGenericType
)
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
106
if (this.
IsGenericType
&& !baseContainsErrorTypes && this.DeclaringCompilation.IsAttributeType(localBase))
Symbols\Source\SourceOrdinaryMethodSymbolBase.cs (1)
424
else if (isVararg && (IsGenericMethod || ContainingType.
IsGenericType
|| Parameters.Length > 0 && Parameters[Parameters.Length - 1].IsParams))
Symbols\Symbol_Attributes.cs (1)
333
if (attributeTypesBuilder[i].
IsGenericType
)
Symbols\TypeSymbolExtensions.cs (1)
1878
RoslynDebug.Assert(type.
IsGenericType
);
Symbols\TypeUnification.cs (2)
150
if (!nt1.
IsGenericType
|| !nt2.
IsGenericType
)
Symbols\TypeWithAnnotations.cs (1)
585
if (namedType.
IsGenericType
)
Symbols\UnboundGenericType.cs (2)
21
if (!type.
IsGenericType
)
33
original.AsMember(originalContainingType.
IsGenericType
? originalContainingType.AsUnboundGenericType() : originalContainingType);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
CodeGen\CodeGenTupleTest.cs (7)
491
Assert.True(iface.
IsGenericType
);
506
Assert.True(iface.
IsGenericType
);
518
Assert.True(iface.
IsGenericType
);
530
Assert.True(iface.
IsGenericType
);
693
Assert.True(constraint.
IsGenericType
);
709
Assert.True(constraint.
IsGenericType
);
1003
Assert.True(field2Type.
IsGenericType
);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (10)
Attributes\AttributeTests.cs (10)
9942
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
9946
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
9963
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
9971
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
9992
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
9996
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
10018
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
10022
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
10044
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
10048
Assert.False(comp.GlobalNamespace.GetTypeMember("C").GetAttributes().Single().AttributeClass.
IsGenericType
);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\AnonymousTypesSymbolTests.cs (2)
1022
Assert.True(fieldsCount == 0 ? !type.
IsGenericType
: type.
IsGenericType
);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Extensions.cs (1)
405
((NamedTypeSymbol)typeSym).
IsGenericType
)