Share via


IBackupRestoreTreeFormatter.PreObject - Méthode

Met en forme une chaîne qui apparaît avant le nom du composant au niveau du nœud actuel.

Espace de noms :  Microsoft.SharePoint.Administration.Backup
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
Function PreObject ( _
    obj As SPBackupRestoreObject, _
    depth As Integer _
) As String
'Utilisation
Dim instance As IBackupRestoreTreeFormatter
Dim obj As SPBackupRestoreObject
Dim depth As Integer
Dim returnValue As String

returnValue = instance.PreObject(obj, _
    depth)
string PreObject(
    SPBackupRestoreObject obj,
    int depth
)

Paramètres

  • depth
    Type : System.Int32

    La profondeur de l'arborescence du nœud actuel.

Valeur renvoyée

Type : System.String
String qui apparaîtra dans l'arbre avant chaque nom de composant.

Remarques

En règle générale, le PreObject est utilisé pour mettre en retrait un nom d'objet.

Exemples

La montre le code suivant et l'implémentation de PreObject.

public String PreObject(SPBackupRestoreObject obj, int depth)
{
    StringBuilder buffer = new StringBuilder();

    AppendSpaces(buffer, depth);

    return buffer.ToString();
}
Public Function PreObject(ByVal obj As SPBackupRestoreObject, ByVal depth As Integer) As String
    Dim buffer As New StringBuilder()

    AppendSpaces(buffer, depth)

    Return buffer.ToString()
End Function

Voir aussi

Référence

IBackupRestoreTreeFormatter interface

IBackupRestoreTreeFormatter - Membres

Microsoft.SharePoint.Administration.Backup - Espace de noms