Lingua

AwaitExtensions.WaitForChangeAsync Metodo

Definizione

Restituisce un'attività che viene completata quando viene modificata la chiave del Registro di sistema specificata.

public static System.Threading.Tasks.Task WaitForChangeAsync(this Microsoft.Win32.RegistryKey registryKey, bool watchSubtree = true, Microsoft.VisualStudio.Threading.RegistryChangeNotificationFilters change = Microsoft.VisualStudio.Threading.RegistryChangeNotificationFilters.Subkey | Microsoft.VisualStudio.Threading.RegistryChangeNotificationFilters.Value, System.Threading.CancellationToken cancellationToken = default);
static member WaitForChangeAsync : Microsoft.Win32.RegistryKey * bool * Microsoft.VisualStudio.Threading.RegistryChangeNotificationFilters * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WaitForChangeAsync (registryKey As RegistryKey, Optional watchSubtree As Boolean = true, Optional change As RegistryChangeNotificationFilters = Microsoft.VisualStudio.Threading.RegistryChangeNotificationFilters.Subkey | Microsoft.VisualStudio.Threading.RegistryChangeNotificationFilters.Value, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametri

registryKey
RegistryKey

Chiave del Registro di sistema da controllare per verificare le modifiche.

watchSubtree
Boolean

true per controllare anche le chiavi discendenti; false per controllare solo questa chiave senza discendenti.

change
RegistryChangeNotificationFilters

Indica i tipi di modifiche da controllare.

cancellationToken
CancellationToken

Token che può essere annullato per rilasciare le risorse dalla ricerca delle modifiche e completare l'attività restituita come annullata.

Valori restituiti

Attività che viene completata quando viene modificata la chiave del Registro di sistema, l'handle viene chiuso o in caso di annullamento.

Si applica a