Как инициировать класс VersionControlServer?

1

Я хочу загрузить файл из TFS 2013. Я нашел класс VersionControlServer: msdn

Но как его инициализировать?

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

Спасибо!

Теги:
tfs
tfs2013
repository
version-control

1 ответ

3
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>();
    versionControlServer.DownloadFile(repositoryPath, localPathStored);

Ещё вопросы

Сообщество Overcoder
Наверх
Меню