Partilhar via


AsyncReaderWriterResourceLock<TMoniker,TResource>.GetResourceAsync Method

Definition

Retrieves the resource with the specified moniker.

protected:
 abstract System::Threading::Tasks::Task<TResource> ^ GetResourceAsync(TMoniker resourceMoniker, System::Threading::CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.Task<TResource> GetResourceAsync (TMoniker resourceMoniker, System.Threading.CancellationToken cancellationToken);
abstract member GetResourceAsync : 'Moniker * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Resource (requires 'Resource : null)>
Protected MustOverride Function GetResourceAsync (resourceMoniker As TMoniker, cancellationToken As CancellationToken) As Task(Of TResource)

Parameters

resourceMoniker
TMoniker

The identifier for the desired resource.

cancellationToken
CancellationToken

A token whose cancellation indicates lost interest in obtaining the resource.

Returns

Task<TResource>

A task whose result is the desired resource.

Applies to