共用方式為


SPBackupRestoreObject.Information property

取得或還原作業的目前技巧SPBackupRestoreObject所代表之元件的向上保留備份的相關資訊的物件。

Namespace:  Microsoft.SharePoint.Administration.Backup
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public ReadOnly Property Information As SPBackupRestoreInformation
    Get
'用途
Dim instance As SPBackupRestoreObject
Dim value As SPBackupRestoreInformation

value = instance.Information
public SPBackupRestoreInformation Information { get; }

Property value

Type: Microsoft.SharePoint.Administration.Backup.SPBackupRestoreInformation
SPBackupRestoreInformation (一律SPBackupInformationSPRestoreInformation) 的保留要備份或還原之元件所需的作業SPBackupRestoreConsoleObject的資訊。

Examples

下列範例會示範如何使用Information屬性中實作的AddBackupObjects方法。

public void AddBackupObjects(SPBackupRestoreObject parent)
{
    if (parent == null)
    {
        throw new ArgumentNullException("parent");
    }

    SPBackupRestoreObject self = parent.AddChild(this);
    self.Information.SetParameter(SPBackupRestoreObject.SPTypeName, this.GetType());
    self.Information.SetParameter(SPBackupRestoreObject.SPDescription, "Description of custom content component");

....foreach (ChildContent child in ChildContentCollection)
    {
        IBackupRestore childIBR = child as IBackupRestore;
        childIBR.AddBackupObjects(self);
    }
}
Public Sub AddBackupObjects(ByVal parent As SPBackupRestoreObject)
    If parent Is Nothing Then
        Throw New ArgumentNullException("parent")
    End If

    Dim self As SPBackupRestoreObject = parent.AddChild(Me)
    self.Information.SetParameter(SPBackupRestoreObject.SPTypeName, Me.GetType())
    self.Information.SetParameter(SPBackupRestoreObject.SPDescription, "Description of custom content component")

    For Each child As ChildContent In ChildContentCollection
        Dim childIBR As IBackupRestore = TryCast(child, IBackupRestore)
        childIBR.AddBackupObjects(self)
    Next child
End Sub

請參閱

參照

SPBackupRestoreObject class

SPBackupRestoreObject members

Microsoft.SharePoint.Administration.Backup namespace