VersionControlServer.GetItem 方法 (String, VersionSpec, Int32, Boolean)

取得在 Item 中指定的路徑。

命名空間:  Microsoft.TeamFoundation.VersionControl.Client
組件:  Microsoft.TeamFoundation.VersionControl.Client (在 Microsoft.TeamFoundation.VersionControl.Client.dll 中)

語法

'宣告
Public Function GetItem ( _
    path As String, _
    version As VersionSpec, _
    deletionId As Integer, _
    includeDownloadInfo As Boolean _
) As Item
public Item GetItem(
    string path,
    VersionSpec version,
    int deletionId,
    bool includeDownloadInfo
)

參數

  • path
    類型:System.String
    項目的路徑,可能是伺服器或區域。
  • deletionId
    類型:System.Int32
    指定項目的刪除 ID。
  • includeDownloadInfo
    類型:System.Boolean
    true 表示取得資訊需要下載檔案。指定 false 節省頻寬,如果不需要。

傳回值

類型:Microsoft.TeamFoundation.VersionControl.Client.Item
指定的 Item。如果找不到項目,則會擲回例外狀況。

備註

True 只設定的 includeDownloadInfo ,如果要下載檔案使用傳回的物件。 呼叫會更快速且需要較少的頻寬,當 includeDownloadInfo 為 false (沒有指定它) 的多載的預設值。

.NET Framework 安全性

請參閱

參考

VersionControlServer 類別

GetItem 多載

Microsoft.TeamFoundation.VersionControl.Client 命名空間