共用方式為


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

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.

See Also

Reference

ApplicationContext Class

ApplicationContext Members

Init Overload

Microsoft.SharePoint.Client Namespace