PostSharp5.0//API Reference/Post­Sharp.​Reflection Namespace/Reflection­Extensions Class/Reflection­Extensions Methods/Reflection­Extensions.​Get­State­Machine­Kind Method

ReflectionExtensions.GetStateMachineKind Method

Gets the kind of state machine (typically Async, [!:StateMachineKind.Enumerable] or None) that implements a given method.

Namespace:  PostSharp.Reflection
Assembly:  PostSharp (in PostSharp.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
public static StateMachineKind GetStateMachineKind(
	this MethodInfo method
)

Parameters

method
Type: System.Reflection.MethodInfo
A method.

Return Value

Type: StateMachineKind
A StateMachineKind value, or None if method is not implemented by a state machine.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type MethodInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also