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
QueryKeyQueryKeyNames the cache entry. Queries presenting equal keys share one entry.
QueryFnFunc<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
queryKeyQueryKeyNames the cache entry. Queries presenting equal keys share one entry.
queryFnFunc<VelvetTask<T>>Fetches the entry's data.