OpenTok.WPFDispatcher

public class WPFDispatcher : OpenTok.IDispatcher

Implementation of IDispatcher that uses the WPF Main/UI thread to dispatch events. Available only for WPF applications. Delivery order is guaranteed. All instances of WPFDispatcher dispatch events to the Main Application thread, so it doesn't matter whether the same WPFDispatcher is always used or a new one is created every time an IDispatcher is required. 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.

Methods

Name Description
WPFDispatcher()
DispatchEvent(sender, handler)
DispatchEvent< T >(sender, handler, args)

WPFDispatcher()

DispatchEvent(sender, handler)

Parameters:
Name Type Description
sender object Originator of the event.
handler EventHandler Method to call after scheduling to the new thread.

DispatchEvent< T >(sender, handler, args)

Parameters:
Name Type Description
sender object Originator of the event.
handler EventHandler&lt;T&gt; Method to call after scheduling to the new thread.
args T Parameter to pass to the handler.