PostSharp SDK 2023.0 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Assembly­Envelope Class / Assembly­Envelope Methods / Assembly­Envelope.​Get­Type­Definition Method / Assembly­Envelope.​Get­Type­Definition Method (String, Binding­Options)

AssemblyEnvelope.GetTypeDefinition Method (String, BindingOptions)

Gets a type defined in this assembly given its name.

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 TypeDefDeclaration GetTypeDefinition(
	string typeName,
	BindingOptions bindingOptions
)

Parameters

typeName
Type: System.String
Type name (in Reflection format).
bindingOptions
Type: PostSharp.Sdk.CodeModel.BindingOptions
Binding options.

Return Value

Type: TypeDefDeclaration
The TypeDefDeclaration named typeName, or null if there is no type named typeName in this assembly.s
See Also