Bagikan melalui


AsyncValueExtensions.AsAsyncValue<T>(Task<T>, T) Method

Definition

public static Microsoft.Maui.Controls.Internals.AsyncValue<T> AsAsyncValue<T> (this System.Threading.Tasks.Task<T> valueTask, T defaultValue = default);
static member AsAsyncValue : System.Threading.Tasks.Task<'T> * 'T -> Microsoft.Maui.Controls.Internals.AsyncValue<'T>
<Extension()>
Public Function AsAsyncValue(Of T) (valueTask As Task(Of T), Optional defaultValue As T = Nothing) As AsyncValue(Of T)

Type Parameters

T

Parameters

valueTask
Task<T>
defaultValue
T

Returns

Applies to