AsyncReaderWriterResourceLock<TMoniker,TResource>.ResourceReleaser.GetResourceAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the lock protected resource.
public System.Threading.Tasks.Task<TResource> GetResourceAsync (TMoniker resourceMoniker, System.Threading.CancellationToken cancellationToken = default);
member this.GetResourceAsync : 'Moniker * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Resource (requires 'Resource : null)>
Public Function GetResourceAsync (resourceMoniker As TMoniker, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TResource)
Parameters
- resourceMoniker
- TMoniker
The identifier for the protected resource.
- cancellationToken
- CancellationToken
A token whose cancellation signals lost interest in the protected resource.
Returns
Task<TResource>
A task whose result is the resource.