2016-08-29 10 views
0

で進捗を実行します: -TFSはファイル私は以下のコードを使用して、TFSから枝をダウンロードしていますパーセンテージ

 TeamFoundationServer tfs = new TeamFoundationServer("URL", System.Net.CredentialCache.DefaultCredentials); 
     // tfs server url including the Collection Name -- CollectionName as the existing name of the collection from the tfs server 
     tfs.EnsureAuthenticated(); 

     VersionControlServer sourceControl = (VersionControlServer)tfs.GetService(typeof(VersionControlServer)); 

     Workspace[] workspaces = sourceControl.QueryWorkspaces(workspaceName, sourceControl.AuthenticatedUser, Workstation.Current.Name); 
     if (workspaces.Length > 0) 
     { 
      sourceControl.DeleteWorkspace(workspaceName, sourceControl.AuthenticatedUser); 
     } 
     Workspace workspace = sourceControl.CreateWorkspace(workspaceName, sourceControl.AuthenticatedUser, "Temporary Workspace"); 
     try 
     { 
      workspace.Map(projectPath, workingDirectory); 
      GetRequest request = new GetRequest(new ItemSpec(projectPath, RecursionType.Full), VersionSpec.Latest); 
      GetStatus status = workspace.Get(request, GetOptions.GetAll | GetOptions.Overwrite); // this line gets the status of request 

     } 
     finally 
     { 
      if (workspace != null) 
      { 
       workspace.Delete(); 

      } 
     } 

私はプログレスバーでのステータスを表示したいが、それを行うことができません。私はBackGroundWorkerツールを使用しています。だから助けてください。

答えて

0

残念ながら、このようなTFS APIは必要なものを実現することはできません。

回避策として、Windows PowerShellスクリプトまたはWindowsバッチ(cmd)ファイルで進行状況インジケータを使用できます。

関連する問題