PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Generic­Map Structure

GenericMap Structure

Map generic arguments to their value.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: (
public struct GenericMap

The GenericMap type exposes the following members.

Public methodGenericMap(ModuleDeclaration, GenericMap, IList<ITypeSignature>)
Initializes a new GenericMap and copies the type parameters of another GenericMap.
Public methodGenericMap(ModuleDeclaration, IList<ITypeSignature>, IList<ITypeSignature>)
Initializes a new instance of the GenericMap type with explicit values.
Public propertyGenericMethodParameterCount
Gets the number of generic method parameters.
Public propertyGenericTypeParameterCount
Gets the number of generic type parameters.
Public propertyIsEmpty
Determines whether the current generic context is empty, i.e. has no generic argument or parameter at all.
Public propertyModule
Public methodApply
Transform the current GenericMap using a second GenericMap.
Public methodContainsGenericParameter
Determines whether the current GenericMap contains a mapping for a given generic parameter.
Public methodEquals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public methodGetGenericMethodParameter
Gets the type mapped to a given method generic parameter.
Public methodGetGenericMethodParameters
Gets the array of method generic arguments in the current GenericMap.
Public methodGetGenericParameter(IGenericParameter)
Gets the type mapped to a given generic parameter given an IGenericParameter.
Public methodGetGenericParameter(GenericParameterKind, Int32)
Gets the type mapped to a generic parameter given its kind and ordinal.
Public methodGetGenericTypeParameter
Gets the type mapped to a given type generic parameter.
Public methodGetGenericTypeParameters
Gets the array of type generic arguments in the current GenericMap.
Public methodGetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetTypeContext
Gets a GenericMap based on the current context, but remove method generic parameters.
Public methodMapGenericMethodParameters
Maps the generic method parameters of the current GenericMap with another GenericMap.
Public methodMapGenericTypeParameters
Maps the generic type parameters of the current GenericMap with another GenericMap.
Public methodToString
Returns the fully qualified type name of this instance.
(Overrides ValueType.ToString().)
Public methodTranslate
Translates the current GenericMap to another ModuleDeclaration.
Public fieldStatic memberEmpty
Gets an empty GenericMap (a context without generic parameters).

Generic arguments are always given by ordinal. The current object stores a map between ordinals and a type signature to which the ordinal is mapped.

Do not rely on the Equals(Object) method to test for equality.

See Also