Share via


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 为空

备注

// 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