ApplicationContext.Init Method (IDictionary<String, String>, SynchronizationContext)
Initializes the application context with the specified parameters that are passed to the Silverlight application.
Namespace: Microsoft.SharePoint.Client
Assembly: Microsoft.SharePoint.Client.Silverlight.Runtime (in Microsoft.SharePoint.Client.Silverlight.Runtime.dll)
Syntax
'Declaration
Public Shared Sub Init ( _
initParams As IDictionary(Of String, String), _
uiThreadSynchronizationContext As SynchronizationContext _
)
'Usage
Dim initParams As IDictionary(Of String, String)
Dim uiThreadSynchronizationContext As SynchronizationContextApplicationContext.Init(initParams, uiThreadSynchronizationContext)
public static void Init(
IDictionary<string, string> initParams,
SynchronizationContext uiThreadSynchronizationContext
)
Parameters
initParams
Type: System.Collections.Generic.IDictionary<String, String>A collection of key/value pairs that contains the parameters that are used to initialize the application context information.
uiThreadSynchronizationContext
Type: System.Threading.SynchronizationContextThe synchronization context of the UI thread.
Remarks
When the uiThreadSynchronizationContext value is null and the code needs to get the SynchronizationContext of the UI thread, the current thread may be blocked.
If the initParams value is null, this method will try to use the initialization parameters that are passed from the Silverlight application host to initialize the application context information. The InvalidOperationException exception is thrown when the initialization parameters are not passed from the Silverlight application host.