다음을 통해 공유


SPUserCodeExecutionManager.Execute Method

Executes a request using a user code wrapper object on the appropriate load-balanced user code execution server.

Namespace:  Microsoft.SharePoint.UserCode
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Function Execute ( _
    userCodeWrapperType As Type, _
    site As SPSite, _
    executionContext As SPUserCodeExecutionContext _
) As Object
'Usage
Dim instance As SPUserCodeExecutionManager
Dim userCodeWrapperType As Type
Dim site As SPSite
Dim executionContext As SPUserCodeExecutionContext
Dim returnValue As Object

returnValue = instance.Execute(userCodeWrapperType, _
    site, executionContext)
public Object Execute(
    Type userCodeWrapperType,
    SPSite site,
    SPUserCodeExecutionContext executionContext
)

Parameters

  • userCodeWrapperType
    Type: System.Type

    The type of wrapper object to activate on the remote user code execution server. This value must specify a type that is derived from the SPUserCodeWrapper class.

Return Value

Type: System.Object
An object containing the results of the request.

Exceptions

Exception Condition
SPUserCodeExecutionPipelineTerminallyFailedException

The protocol server encounters an unrecoverable and terminal failure. The protocol client must not send any more Execute requests to the protocol server after this exception has been thrown, until the Ping method returns true.

SPUserCodeExecutionPipelineFailedException

The protocol server itself encounters an error while attempting to run the user code request.

SPUserCodeSolutionExecutionFailedException

The user code being run on the protocol server fails.

SPUserCodeValidationFailedException

A failure is encountered while validating the assembly group that contains the user code.

See Also

Reference

SPUserCodeExecutionManager Class

SPUserCodeExecutionManager Members

Microsoft.SharePoint.UserCode Namespace