共用方式為


ClientRuntimeContext.AddClientTypeAssembly Method

Stores the client library type of the calling assembly.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight.Runtime (in Microsoft.SharePoint.Client.Silverlight.Runtime.dll);  Microsoft.SharePoint.Client.Runtime (in Microsoft.SharePoint.Client.Runtime.dll)

Syntax

'Declaration
Public Shared Sub AddClientTypeAssembly ( _
    assembly As Assembly _
)
'Usage
Dim assembly As [Assembly]

ClientRuntimeContext.AddClientTypeAssembly(assembly)
public static void AddClientTypeAssembly(
    Assembly assembly
)

Parameters

Remarks

By default, the runtime checks all of the loaded assemblies and retrieves the client type information. This process is executed only once, when the runtime needs the client type information. If the assembly is dynamically loaded after the process, the runtime will not retrieve the client type information. Therefore, this method should be called for all dynamically loaded assemblies that contain client library types that have the ClientTypeAssemblyAttribute attribute.

See Also

Reference

ClientRuntimeContext Class

ClientRuntimeContext Members

Microsoft.SharePoint.Client Namespace