Module Generics
Provides support for generic types and methods.
The classes UnboundGeneric* represent the unbound form of the generic,
whereas ConstructedGeneric* represent the constructed generic where type arguments
have been supplied and are bound to the type parameters.
There is a one-to-many relationship between an unbound generic (UnboundGenric*)
and its constructed generics (ConstructedGeneric*).
Generics can be partially constructed if they are unbound generics contained
within constructed generic types. The predicate getUnboundDeclaration refers
to the ultimate UnboundGeneric type/method as defined in the source code.
Import path
import semmle.code.csharp.GenericsImports
Classes
| ConstructedClass | A constructed (bound) class. (See the comments on |
| ConstructedDelegateType | A constructed (bound) delegate type. (See the comments on |
| ConstructedGeneric | A constructed generic. |
| ConstructedInterface | A C# constructed (bound) interface. (See the comments on |
| ConstructedLocalFunction | A constructed generic local function, for example the target |
| ConstructedMethod | A constructed (bound) method, for example the target |
| ConstructedStruct | A constructed (bound) |
| ConstructedType | A constructed (bound) type. This is a generic type for which actual type arguments have been supplied, for example |
| Generic | A generic declaration. Either an unbound generic ( |
| NonConstructedMethod | A method that is not constructed. That is, either a method that is not a generic method or an unbound generic method ( |
| TypeParameter | A type parameter, for example |
| TypeParameterConstraints | A set of type parameter constraints. |
| UnboundGeneric | A generic declaration with type parameters. |
| UnboundGenericClass | An unbound generic class, for example |
| UnboundGenericDelegateType | An unbound generic delegate type. (See the comments on |
| UnboundGenericInterface | An unbound generic interface, for example |
| UnboundGenericMethod | An unbound generic method. This is a generic method whose signature involves formal type parameters, For example |
| UnboundGenericStruct | An unbound generic |
| UnboundGenericType | An unbound generic type. This is a generic type with type parameters (for example |
| UnboundLocalFunction | An unbound generic local function, for example |