Share via


SPBackupRestoreObject.SPDescription field

Defines a String that can be used to set or get the value of the description parameter in the object returned by the Information property.

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

Syntax

'Declaration
Public Const SPDescription As String
'Usage
Dim value As String

value = SPBackupRestoreObject.SPDescription
public const string SPDescription

Remarks

For more information on the use of this constant see GetParameter and SetParameter.

Examples

The following example shows how to use the SPDescription field in an implementation of the AddBackupObjects method.

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

See also

Reference

SPBackupRestoreObject class

SPBackupRestoreObject members

Microsoft.SharePoint.Administration.Backup namespace