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)
Syntax
C#
public ITypeSignature GetType(
	Type type
)

Parameters

type
Type: System.Type
The reflection type.

Return Value

Type: ITypeSignature
An ITypeSignature.
Remarks

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