IBackupRestoreTreeFormatter.PreObject method
Formats a string that will appear before the name of the component at the current node.
Namespace: Microsoft.SharePoint.Administration.Backup
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Function PreObject ( _
obj As SPBackupRestoreObject, _
depth As Integer _
) As String
'Usage
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
)
Parameters
obj
Type: Microsoft.SharePoint.Administration.Backup.SPBackupRestoreObjectThe component for the current node.
depth
Type: System.Int32The depth in the tree of the current node.
Return value
Type: System.String
A String that will appear in the tree before each component name.
Remarks
Typically, PreObject is used to indent an object name.
Examples
The following code shows and implementation of 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
See also
Reference
IBackupRestoreTreeFormatter interface