共用方式為


SPUserCodeService.OnPreRestore Method

Raises the PreRestore event.

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

Syntax

'Declaration
Public Function OnPreRestore ( _
    sender As Object, _
    info As SPRestoreInformation _
) As Boolean
'Usage
Dim instance As SPUserCodeService
Dim sender As Object
Dim info As SPRestoreInformation
Dim returnValue As Boolean

returnValue = instance.OnPreRestore(sender, _
    info)
public bool OnPreRestore(
    Object sender,
    SPRestoreInformation info
)

Parameters

  • sender
    Type: System.Object

    The SPUserCodeService object that is to be restored.

Return Value

Type: System.Boolean
true if successful; otherwise, false.

Implements

IBackupRestore.OnPreRestore(Object, SPRestoreInformation)

Remarks

This implementation always returns true.

This method is only intended to be called from catastrophic backup and restore infrastructure code in SharePoint Foundation.

See Also

Reference

SPUserCodeService Class

SPUserCodeService Members

Microsoft.SharePoint.Administration Namespace