PostSharp 2023.0 / / Post­Sharp Documentation / 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 (for example, Async, Iterator or None) that implements a given method.

Namespace:  PostSharp.Reflection
Assembly:  PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
public static StateMachineKind GetStateMachineKind(
	this MethodInfo 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