如何初始化VersionControlServer类?

我想从TFS 2013下载文件。我找到了VersionControlServer类: msdn

但是如何初始化呢?

  VersionControlServer vs; vs.DownloadFile(repositoryPath,localPath); // vs not initialized! 

谢谢!

 String repositoryPath = "$/MyColl1/Folder1/Folder2/TargetFile.txt"; String localPathStored = Environment.CurrentDirectory + "/" + "TargetFile.txt"; String uriSite = "http://tfs-server:8080/tfs/../../vN.0/....asmx"; TfsTeamProjectCollection teamProjectCollection =TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri(uriSite)); VersionControlServer versionControlServer = teamProjectCollection.GetService(); versionControlServer.DownloadFile(repositoryPath, localPathStored);