SPBackupRestoreObject.Information 属性
获取最多可以容纳备份有关的信息的对象或组件由SPBackupRestoreObject是当前正在进行的还原操作。
命名空间: Microsoft.SharePoint.Administration.Backup
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public ReadOnly Property Information As SPBackupRestoreInformation
Get
用法
Dim instance As SPBackupRestoreObject
Dim value As SPBackupRestoreInformation
value = instance.Information
public SPBackupRestoreInformation Information { get; }
属性值
类型:Microsoft.SharePoint.Administration.Backup.SPBackupRestoreInformation
SPBackupRestoreInformation (始终SPBackupInformation或SPRestoreInformation) 保存操作的SPBackupRestoreConsoleObject需要备份或恢复该组件的信息。
示例
下面的示例演示如何在AddBackupObjects方法的实现中使用的Information属性。
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