PostSharp SDK 2023.0 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Declaration­Cache Class / Declaration­Cache Methods / Declaration­Cache.​Get­Type Method / Declaration­Cache.​Get­Type Method (Type)

DeclarationCache.GetType Method (Type)

Gets a type (ITypeSignature) given a reflection type (Type), with default binding options.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 2023.0.3.0 (2023.0.3.0)
public ITypeSignature GetType(
	Type type


Type: System.Type
The reflection type.

Return Value

Type: ITypeSignature
An ITypeSignature.

You are required to use the second overload and to specify BindingOptions when you require a generic type.

If type is a primitive type, the method returns the class representing it, i.e. it does not return the intrinsic type. Intrinsic type substitution is allowed for type constructions.

See Also