Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

OpenTok.UWPDispatcher

Implementation of IDispatcher that uses UWP Main/UI thread to dispatch events. Available only for UWP applications. Delivery order is guaranteed. CPU-intensive or long-running tasks should not be executed in the handlers, as they would block the UI thread and affect performance or responsiveness. More...

Inherits OpenTok.IDispatcher.

Public Member Functions

 UWPDispatcher (Control mainPage, CoreDispatcherPriority dispatchPriority=CoreDispatcherPriority.Normal)
async void DispatchEvent (object sender, EventHandler handler)
 Schedules a parameterless event. More...
async void DispatchEvent< T > (object sender, EventHandler< T > handler, T args)
 Schedules a typed parameter event. More...

Detailed Description

Implementation of IDispatcher that uses UWP Main/UI thread to dispatch events. Available only for UWP applications. Delivery order is guaranteed. CPU-intensive or long-running tasks should not be executed in the handlers, as they would block the UI thread and affect performance or responsiveness.

Member Function Documentation

◆ DispatchEvent()

async void OpenTok.UWPDispatcher.DispatchEvent ( object  sender,
EventHandler  handler 
)

Schedules a parameterless event.

Parameters
senderOriginator of the event.
handlerMethod to call after scheduling to the new thread.

Implements OpenTok.IDispatcher.

◆ DispatchEvent< T >()

async void OpenTok.UWPDispatcher.DispatchEvent< T > ( object  sender,
EventHandler< T >  handler,
args 
)

Schedules a typed parameter event.

Template Parameters
TThe type of the parameter
Parameters
senderOriginator of the event.
handlerMethod to call after scheduling to the new thread.
argsParameter to pass to the handler.

Implements OpenTok.IDispatcher.

Type Constraints
T :EventArgs