Share via


Awaitable.FromSource<TSource,TItem> Method

Definition

Wraps source to build item as a IAwaitable<T>.

public static Microsoft.Bot.Builder.Dialogs.IAwaitable<TItem> FromSource<TSource,TItem> (TSource source, Func<TSource,System.Threading.Tasks.Task<TItem>> resolver);
static member FromSource : 'Source * Func<'Source, System.Threading.Tasks.Task<'Item>> -> Microsoft.Bot.Builder.Dialogs.IAwaitable<'Item>
Public Shared Function FromSource(Of TSource, TItem) (source As TSource, resolver As Func(Of TSource, Task(Of TItem))) As IAwaitable(Of TItem)

Type Parameters

TSource

The type of the source for build the item.

TItem

The type if the item.

Parameters

source
TSource

The source item that will be wrapped.

resolver
Func<TSource,Task<TItem>>

The resolution function from source to item.

Returns

IAwaitable<TItem>

Applies to