0
ich den Zweiges von TFS ist Laden des folgenden Code verwendet: -TFS Datei abrufen Fortschritt Laufen in Prozent
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();
}
}
Ich mag den Status in ProgressBar zeigen, aber nicht in der Lage, es zu tun. Ich benutze sogar BackGroundWorker Tool. Also bitte hilf mir.