IBackupRestoreTreeFormatter.PreObject method
格式字串,會出現在目前節點元件的名稱之前。
Namespace: Microsoft.SharePoint.Administration.Backup
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Function PreObject ( _
obj As SPBackupRestoreObject, _
depth As Integer _
) As String
'用途
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
)
參數
obj
Type: Microsoft.SharePoint.Administration.Backup.SPBackupRestoreObject目前節點的元件。
depth
Type: System.Int32在樹狀目錄中的目前節點深度。
傳回值
Type: System.String
String 會出現在每個元件名稱之前的樹狀目錄中。
備註
一般而言, PreObject用來縮排的物件名稱。
Examples
下列程式碼所示及實作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
請參閱
參照
IBackupRestoreTreeFormatter interface