AsyncReaderWriterResourceLock<TMoniker, TResource>.PrepareResourceForExclusiveAccessAsync Method
Microsoft internal only. Prepares a resource for access by one thread.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Protected MustOverride Function PrepareResourceForExclusiveAccessAsync ( _
resource As TResource, _
lockFlags As AsyncReaderWriterResourceLock(Of T).LockFlags, _
cancellationToken As CancellationToken _
) As Task
protected abstract Task PrepareResourceForExclusiveAccessAsync(
TResource resource,
AsyncReaderWriterResourceLock<T>.LockFlags lockFlags,
CancellationToken cancellationToken
)
protected:
virtual Task^ PrepareResourceForExclusiveAccessAsync(
TResource resource,
AsyncReaderWriterResourceLock<T>::LockFlags lockFlags,
CancellationToken cancellationToken
) abstract
abstract PrepareResourceForExclusiveAccessAsync :
resource:'TResource *
lockFlags:AsyncReaderWriterResourceLock<T>.LockFlags *
cancellationToken:CancellationToken -> Task
protected abstract function PrepareResourceForExclusiveAccessAsync(
resource : TResource,
lockFlags : AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlags,
cancellationToken : CancellationToken
) : Task
Parameters
resource
Type: TResourceThe resource.
lockFlags
Type: Microsoft.VisualStudio.Threading.AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlagsThe aggregate of all flags from the active and nesting locks.
cancellationToken
Type: System.Threading.CancellationTokenThe token whose cancellation signals lost interest in the resource.
Return Value
Type: System.Threading.Tasks.Task
A Task whose completion signals the resource has been prepared.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.