VersionControlPath.Combine 方法 (String, String, String, PathLength)

命名基本本地路径,基本服务器路径和目标本地路径计算目标服务器路径。 这是通过启动本地路径的相对路径,该转换为服务器相对路径并将其完成对基服务器路径。 注意:,则无法生成目标服务器路径,此方法将引发无效的路径异常。 此可能的原因包括: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
)

参数

  • targetLocalPath
    类型:System.String
    目标项的本地路径。
  • baseServerPath
    类型:System.String
    源项目的服务器路径。

返回值

类型:System.String
目标项的绝对服务器路径。

.NET Framework 安全性

请参阅

参考

VersionControlPath 类

Combine 重载

Microsoft.TeamFoundation.VersionControl.Common 命名空间