言語

AwaitExtensions.WaitForChangeAsync メソッド

定義

指定したレジストリ キーが変更されたときに完了するタスクを返します。

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

パラメーター

registryKey
RegistryKey

変更を監視するレジストリ キー。

watchSubtree
Boolean

true キーの降順のキーも監視する。このキーのみを子孫なしで監視する false

change
RegistryChangeNotificationFilters

監視する変更の種類を示します。

cancellationToken
CancellationToken

リソースが変更を監視するのを解放し、返されたタスクを取り消し済みとして完了するために取り消される可能性のあるトークン。

返品

レジストリ キーが変更されたとき、ハンドルが閉じられた場合、または取り消し時に完了するタスク。

適用対象