Udostępnij za pośrednictwem


Metoda AsyncReaderWriterResourceLock<TMoniker, TResource>.ResourceReleaser.GetResourceAsync —

Wewnętrznie w firmie Microsoft tylko.Pobiera zasobów chronionych blokady.

Przestrzeń nazw:  Microsoft.VisualStudio.Threading
Zestaw:  Microsoft.VisualStudio.Threading (w Microsoft.VisualStudio.Threading.dll)

Składnia

'Deklaracja
Public Function GetResourceAsync ( _
    resourceMoniker As TMoniker, _
    cancellationToken As CancellationToken _
) As Task(Of TResource)
public Task<TResource> GetResourceAsync(
    TMoniker resourceMoniker,
    CancellationToken cancellationToken
)
public:
Task<TResource>^ GetResourceAsync(
    TMoniker resourceMoniker, 
    CancellationToken cancellationToken
)
member GetResourceAsync : 
        resourceMoniker:'TMoniker * 
        cancellationToken:CancellationToken -> Task<'TResource> 
public function GetResourceAsync(
    resourceMoniker : TMoniker, 
    cancellationToken : CancellationToken
) : Task<TResource>

Parametry

  • resourceMoniker
    Typ: TMoniker

    Identyfikator dla chronionego zasobu.

  • cancellationToken
    Typ: CancellationToken

    Tokenu, którego anulowanie sygnały interesować chronionego zasobu.

Wartość zwracana

Typ: Task<TResource>
A Task których wynik jest zasób.

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

AsyncReaderWriterResourceLock<TMoniker, TResource>.ResourceReleaser Struktura

Przestrzeń nazw Microsoft.VisualStudio.Threading