Table of Contents

Method IsAsync

Namespace
Xunit.Sdk
Assembly
xunit.v3.common.dll

IsAsync(MethodInfo)

Determines if the given method is async, as matters to xUnit.net. This means it either (a) returns a Task or ValueTask; or, (b) it is an F# function which was declared as async. Note that this is not the same thing as an "awaitable" method, since xUnit.net does not recreate the compiler's await machinery at runtime.

public static bool IsAsync(MethodInfo method)

Parameters

method MethodInfo

The method to test

Returns

bool

Returns true if the method is async; returns false otherwise.