GpioController.WaitForEventAsync Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
| WaitForEventAsync(Int32, PinEventTypes, CancellationToken) |
Chiamata asincrona finché non viene ricevuto un evento di tipo eventType o viene richiesto un annullamento. |
| WaitForEventAsync(Int32, PinEventTypes, TimeSpan) |
Chiamata asincrona per attendere che venga ricevuto un evento di tipo eventType o che sia scaduto un periodo di tempo. |
WaitForEventAsync(Int32, PinEventTypes, CancellationToken)
Chiamata asincrona finché non viene ricevuto un evento di tipo eventType o viene richiesto un annullamento.
public System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult> WaitForEventAsync(int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, System.Threading.CancellationToken token);
public virtual System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult> WaitForEventAsync(int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, System.Threading.CancellationToken token);
member this.WaitForEventAsync : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult>
abstract member WaitForEventAsync : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult>
override this.WaitForEventAsync : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult>
Public Function WaitForEventAsync (pinNumber As Integer, eventTypes As PinEventTypes, token As CancellationToken) As ValueTask(Of WaitForEventResult)
Public Overridable Function WaitForEventAsync (pinNumber As Integer, eventTypes As PinEventTypes, token As CancellationToken) As ValueTask(Of WaitForEventResult)
Parametri
- pinNumber
- Int32
Numero di puntina nello schema di numerazione del controller.
- eventTypes
- PinEventTypes
Tipi di evento da attendere.
- token
- CancellationToken
Token di annullamento di quando l'operazione deve arrestarsi in attesa di un evento.
Restituisce
Attività che rappresenta l'operazione di recupero della struttura che contiene il risultato dell'operazione in attesa
Si applica a
WaitForEventAsync(Int32, PinEventTypes, TimeSpan)
Chiamata asincrona per attendere che venga ricevuto un evento di tipo eventType o che sia scaduto un periodo di tempo.
public System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult> WaitForEventAsync(int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, TimeSpan timeout);
member this.WaitForEventAsync : int * System.Device.Gpio.PinEventTypes * TimeSpan -> System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult>
Public Function WaitForEventAsync (pinNumber As Integer, eventTypes As PinEventTypes, timeout As TimeSpan) As ValueTask(Of WaitForEventResult)
Parametri
- pinNumber
- Int32
Numero di puntina nello schema di numerazione del controller.
- eventTypes
- PinEventTypes
Tipi di evento da attendere.
- timeout
- TimeSpan
Ora di attesa dell'evento.
Restituisce
Attività che rappresenta l'operazione di recupero della struttura contenente il risultato dell'operazione di attesa.