MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeAsync­Info
Open sandboxFocus

AsyncInfo Class

Information about an async method, returned by the GetAsyncInfo(IMethod) extension method of IMethod.

Inheritance
System.Object
AsyncInfo
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public sealed class AsyncInfo : ValueType

Properties

Name Description
HasMethodBuilder

Gets a value indicating whether the return type of the method has an AsyncMethodBuilderAttribute custom attribute.

IsAsync

Gets a value indicating whether the method has an async implementation, i.e. has the async modifier.

IsAwaitable

Gets a value indicating whether the return type of the method is awaitable, i.e. whether it can be used with the await keyword. This does not include IAsyncEnumerable, which can be used with await foreach but not await.

IsAwaitableOrVoid

Gets a value indicating whether the return type of the method is either awaitable (see IsAwaitable) either void.

ResultType

Gets the type of the result of the async method, i.e. the type of the await expression.