Suggestions

close search

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

Visit the Vonage API Developer Portal

OpenTok.Context

Used to manage resources for Session, Publisher, and Subscriber objects. More...

Inherits IDisposable.

Public Member Functions

 Context (IDispatcher dispatcher=null)
 Constructor for Context that receives a specific IDispatcher for events. More...
void Dispose ()
 Disposes of the all OpenTok resources used in the current context. Call this after you call Session.Disconnect to clean up unused resources. More...

Protected Member Functions

virtual void Dispose (bool disposing)

Properties

static Context Instance [get]
 The Context instance. This is a singleton instance. However it is reset to a new instance after you call the Dispose() method. This entry point for a Context object is limited in configuration options and only works for WPF presentation framework, so it will be removed eventually. Please use the Context(IDispatcher) constructor and provide the corresponding presentation framework IDispatcher (or one of the common IDispatchers). The new form equivalent of the previous Context.Instance form is new Context(new WPFDispatcher()). More...

Detailed Description

Used to manage resources for Session, Publisher, and Subscriber objects.

Call the Dispose() method to dispose of the all OpenTok resources used in the context.

Constructor & Destructor Documentation

◆ Context()

OpenTok.Context.Context ( IDispatcher  dispatcher = null)

Constructor for Context that receives a specific IDispatcher for events.

Parameters
dispatcherThe IDispatcher instance used to schedule events. The SDK includes several IDispatcher implementations, which should be enough for most applications. You can also build a custom IDispatcher by overriding the IDispatcher interface. The SDK includes the following IDispatcher implementations, which are available for all presentation frameworks: There is also an IDispatcher implementation provided for each supported presentation framework:

Member Function Documentation

◆ Dispose()

void OpenTok.Context.Dispose ( )

Disposes of the all OpenTok resources used in the current context. Call this after you call Session.Disconnect to clean up unused resources.

Property Documentation

◆ Instance

Context OpenTok.Context.Instance

The Context instance. This is a singleton instance. However it is reset to a new instance after you call the Dispose() method. This entry point for a Context object is limited in configuration options and only works for WPF presentation framework, so it will be removed eventually. Please use the Context(IDispatcher) constructor and provide the corresponding presentation framework IDispatcher (or one of the common IDispatchers). The new form equivalent of the previous Context.Instance form is new Context(new WPFDispatcher()).