Users Guide
方法 说明
注: .NET 4.0 WCF (https://
connect.microsoft.com/VisualStudio/
feedback/ViewFeedback.aspx?
FeedbackID=413312
)中存在路径转义字符无法
在 URI 模板中正常工作的已知问题。由于卷名称
包含“\”和“?”,因此必须使用其他特殊字符来替换
特殊字符“
\”和“?”。
public string GetMountName()
为这一可用于将卷映像安装至某文件夹的卷返回名
称。
VolumeNameCollection (namespace
Replay.Common.Contracts.Metadata.Storage)
从参数 System.Collections.ObjectModel.Collection<VolumeName> 继承其值。
方法 说明
public override bool Equals(object obj)
确定此实例与某个同样为 VolumeNameCollection
对象的指定对象是否具有相同值。(覆盖
Object.Equals(Object)。)
public override int GetHashCode()
返回此 VolumeNameCollection 的哈希代码。
(覆盖 Object.GetHashCode()。)
表. 11: VolumeSnapshotInfo (namesapce Replay.Common.Contracts.Transfer)
方法 说明
public Uri BlockHashesUri { get; set;}
获取或设置可用于读取卷数据块的 MD5 哈希值的
URI。
public Uri BlockDataUri { get; set;}
获取或设置可用于读取卷数据块的 URI。
VolumeSnapshotInfoDictionary (namespace Replay.Common.Contracts.Transfer)
从参数 System.Collections.Generic.Dictionary<VolumeName, VolumeSnapshotInfo> 继承其
值。
Pretransferscript.ps1
PreTransferScript 在传输快照前于代理端执行。
# receiving parameter from transfer job
param([object]$TransferPrescriptParameter)
# building path to Agent's Common.Contracts.dll and loading this assembly
$regLM = [Microsoft.Win32.Registry]::LocalMachine
$regLM = $regLM.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
\AppRecovery Agent 5')
$regVal = $regLM.GetValue('InstallLocation')
$regVal = $regVal + 'Common.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal) | out-null
# Converting input parameter into specific object
$TransferPrescriptParameterObject = $TransferPrescriptParameter -as
158










