PostSharp 6.6 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Reflection.​Method­Body Namespace / IMethod­Body­Service Interface / IMethod­Body­Service Methods / IMethod­Body­Service.​Get­Method­Body Method

IMethodBodyService.GetMethodBody Method

Decompiles a method and gets an AST representation of it.

Namespace:  PostSharp.Reflection.MethodBody
Assembly:  PostSharp (in PostSharp.dll) Version: 6.6.14.0 (6.6.14.0)
Syntax
C#
IMethodBody GetMethodBody(
	MethodBase method,
	MethodBodyAbstractionLevel abstractionLevel
)

Parameters

method
Type: System.Reflection.MethodBase
The method to decompile.
abstractionLevel
Type: PostSharp.Reflection.MethodBody.MethodBodyAbstractionLevel
The required level of abstraction and detail.

Return Value

Type: IMethodBody
AST representing the method at the required level of abstraction and detail.
See Also