TfsConfigurationServer 建構函式 (Uri)

初始化 TfsConfigurationServer 物件的新執行個體。

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

語法

'宣告
Public Sub New ( _
    uri As Uri _
)
public TfsConfigurationServer(
    Uri uri
)

參數

  • uri
    類型:System.Uri
    伺服器統一資源識別元 (URI) 執行 Team Foundation Server的 (URI)。

例外狀況

例外狀況 條件
ArgumentNullException

uri 為 null 時引發。

備註

// Connect to Team Foundation Server
//     server is the name of the server that is running the Team Foundation application-tier. 
//     port is the port that Team Foundation uses. The default port is 8080. 
//     vdir is the virtual path to the Team Foundation application. The default path is tfs. 
Uri tfsUri = (args.Length < 1) ? 
new Uri("http://server:port/vdir") : new Uri(args[0]); 

// Connect to the first one in the array
TfsConfigurationServer tfs = new TfsConfigurationServer(tfsUri);

.NET Framework 安全性

請參閱

參考

TfsConfigurationServer 類別

TfsConfigurationServer 多載

Microsoft.TeamFoundation.Client 命名空間

其他資源

從主控台應用程式連接到 Team Foundation Server