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, Binding­Options)

DeclarationCache.GetType Method (Type, BindingOptions)

Gets a type (ITypeSignature) given a reflection type (Type), but specifies BindingOptions.

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,
	BindingOptions bindingOptions
)

Parameters

type
Type: System.Type
The reflection type.
bindingOptions
Type: PostSharp.Sdk.CodeModel.BindingOptions
Binding options. Specify RequireGenericInstance or RequireGenericDefinition when requesting a generic type.

Return Value

Type: ITypeSignature
An ITypeSignature.
Remarks
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