Table of Contents

Constructor QueryOptions

Namespace
Velvet
Assembly
Velvet.Docs.dll

QueryOptions(QueryKey, Func<CancellationToken, VelvetTask<T>>)

QueryOptions<TQueryFnData, TData> for a query whose result holds the data its query function returns.

public QueryOptions(QueryKey QueryKey, Func<CancellationToken, VelvetTask<T>> QueryFn)

Parameters

QueryKey QueryKey

Names the cache entry. Queries presenting equal keys share one entry.

QueryFn Func<CancellationToken, VelvetTask<T>>

Fetches the entry's data; see QueryFn.

QueryOptions(QueryKey, Func<VelvetTask<T>>)

Options whose query function takes no token: its request is not cancelled when the last query reading the entry leaves, and lands in the entry for the next reader to find.

public QueryOptions(QueryKey queryKey, Func<VelvetTask<T>> queryFn)

Parameters

queryKey QueryKey

Names the cache entry. Queries presenting equal keys share one entry.

queryFn Func<VelvetTask<T>>

Fetches the entry's data.