Provides information about the async characteristics of a method, returned by the GetAsyncInfo(IMethod) extension method of IMethod.
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public readonly struct AsyncInfoRemarks
Use this struct to inspect async method properties at compile time, for example in BuildAspect.
The ResultType property is particularly useful when you need the actual result type instead of the task type.
For example, for a method returning Task<string>, ResultType is string.
Properties
| Name | Description |
|---|---|
| HasMethodBuilder | Gets a value indicating whether the return type of the method has an |
| IsAsync | Gets a value indicating whether the method has an async implementation, i.e., whether it has the |
| IsAwaitable | Gets a value indicating whether the return type of the method is awaitable, i.e., whether it can be used with the |
| IsAwaitableOrVoid | Gets a value indicating whether the return type of the method is either awaitable (see IsAwaitable) or |
| ResultType | Gets the unwrapped result type of the async method, i.e., the type of the |