PostSharp4.3/API Reference/Post­Sharp.​Reflection.​Syntax Namespace/ISyntax­Reflection­Service Interface/ISyntax­Reflection­Service Methods/ISyntax­Reflection­Service.​Get­Method­Body Method
ISyntaxReflectionService.GetMethodBody Method
Decompiles a method and gets an AST representation of it.

Namespace: PostSharp.Reflection.Syntax
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.48.0 (4.3.48.0)
Syntax
C#
ISyntaxMethodBody GetMethodBody(
	MethodBase method,
	SyntaxAbstractionLevel abstractionLevel
)

Parameters

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

Return Value

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