SPContentDatabase.OnPreRestore Method (SPDatabaseSnapshotRestoreEvent)
Provides preparation processing for the restoration of a content database from one of its snapshots.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Sub OnPreRestore ( _
args As SPDatabaseSnapshotRestoreEvent _
)
'Usage
Dim instance As SPContentDatabase
Dim args As SPDatabaseSnapshotRestoreEvent
instance.OnPreRestore(args)
public void OnPreRestore(
SPDatabaseSnapshotRestoreEvent args
)
Parameters
args
Type: Microsoft.SharePoint.Administration.Backup.SPDatabaseSnapshotRestoreEventAn object that contains a reference to the snapshot from which the database is restored.
Implements
IDatabaseSnapshotRestore.OnPreRestore(SPDatabaseSnapshotRestoreEvent)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | args is a null reference (Nothing in Visual Basic). |
Remarks
This implementation takes the database offline.
Do not call this method from your own code. The restoration process calls it.