命名基本本地路径,基本服务器路径和目标本地路径计算目标服务器路径。 这是通过启动本地路径的相对路径,该转换为服务器相对路径并将其完成对基服务器路径。 注意:,则无法生成目标服务器路径,此方法将引发无效的路径异常。 此可能的原因包括:1) 本地路径是在驱动器上并不是相对的。2) 合并计算的相对路径与基础服务器路径产生“负文件夹深度”(即在根,$) 上的目录。 示例:合并 (@ "c:\myproj\abc\efg", @ "c:\myproj\abc\blech", @ " $/foo”) -> @ " $/blech”合并 (@ "c:\myproj\abc\efg", @ "c:\myproj\abc\efg\x", @ " $/bar”) -> @ " $/efg/x”合并 (@ "c:\myproj\abc\efg", @ "c:\yourproj\abc\efg\x", @ " $/bar”) -> @ " InvalidPathException”合并 (@ "c:\myproj\abc\efg", @ "c:\yourproj\abc\efg", @ " $/myproj/abc/efg”) -> @ " $/yourproj/abc/efg”
命名空间: Microsoft.TeamFoundation.VersionControl.Common
程序集: Microsoft.TeamFoundation.VersionControl.Common(在 Microsoft.TeamFoundation.VersionControl.Common.dll 中)
语法
声明
Public Shared Function Combine ( _
baseLocalPath As String, _
targetLocalPath As String, _
baseServerPath As String, _
maxServerPathLength As PathLength _
) As String
public static string Combine(
string baseLocalPath,
string targetLocalPath,
string baseServerPath,
PathLength maxServerPathLength
)
参数
- baseLocalPath
类型:System.String
源项本地路径。
- targetLocalPath
类型:System.String
目标项的本地路径。
- baseServerPath
类型:System.String
源项目的服务器路径。
- maxServerPathLength
类型:Microsoft.TeamFoundation.VersionControl.Common.PathLength
返回值
类型:System.String
目标项的绝对服务器路径。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。