IBackupRestoreTreeFormatter.PreObject 方法
格式化的字符串将显示在当前节点的组件的名称之前。
命名空间: Microsoft.SharePoint.Administration.Backup
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
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
类型:Microsoft.SharePoint.Administration.Backup.SPBackupRestoreObject当前节点的的组件。
depth
类型:System.Int32在树中当前节点的深度。
返回值
类型:System.String
将出现在树中每个组件名称前String 。
备注
通常情况下, PreObject用于缩进的对象名称。
示例
下面的代码所示和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 接口