IValueTaskSource<TResult> 接口
定义
表示一个可由 ValueTask<TResult> 包装的对象。Represents an object that can be wrapped by a ValueTask<TResult>.
generic <typename TResult>
public interface class IValueTaskSource
public interface IValueTaskSource<out TResult>
type IValueTaskSource<'Result> = interface
Public Interface IValueTaskSource(Of Out TResult)
类型参数
- TResult
的结果生成的结果的类型 IValueTaskSource<TResult> 。The type of the result produced by the the result of the IValueTaskSource<TResult>.
这是协变类型参数。 即,可以使用指定的类型,也可以使用派生程度较高的任何类型。 有关协变和逆变的详细信息,请参阅泛型中的协变和逆变。方法
| GetResult(Int16) |
获取 IValueTaskSource<TResult> 的结果。Gets the result of the IValueTaskSource<TResult>. |
| GetStatus(Int16) |
获取当前操作的状态。Gets the status of the current operation. |
| OnCompleted(Action<Object>, Object, Int16, ValueTaskSourceOnCompletedFlags) |
为此 IValueTaskSource<TResult> 计划延续操作。Schedules the continuation action for this IValueTaskSource<TResult>. |