Le fournisseur (code source contient) turtletfs utilise l'API TFS/VSTS pour obtenir des éléments de travail de TFS/VSTS, mais ce fournisseur est trop vieux, vous pouvez construire le fournisseur par vous-même avec l'API TFS/VSTS .
Le code simple des éléments de travail avec l'API get TFS/VSTS:
var tfs = TeamFoundationServerFactory.GetServer("https://[account].visualstudio.com");
tfs.EnsureAuthenticated();
var workItemStore = (WorkItemStore)tfs.GetService(typeof(WorkItemStore));
var r= workItemStore.Query("select[System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State], [System.Tags] from WorkItems where [System.TeamProject] = 'ScrumStarain' and [System.WorkItemType] = 'Product Backlog Item' and [System.State] <> ''");
Un autre exemple:
var u = new Uri("https://[account].visualstudio.com");
VssCredentials c = new VssCredentials(new Microsoft.VisualStudio.Services.Common.WindowsCredential(new NetworkCredential("[alternate user name]", "[password]")));
var connection = new VssConnection(u, c);
var workitemClient = connection.GetClient<WorkItemTrackingHttpClient>();
var result = workitemClient.QueryByWiqlAsync(new Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.Wiql() { Query = "select[System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State], [System.Tags] from WorkItems where [System.TeamProject] = 'ScrumStarain2' and [System.WorkItemType] = 'Product Backlog Item' and [System.State] <> ''" }, "ScrumStarain2").Result;
Que diriez-vous https://github.com/13xforever/turtletfs? –
@ starain-MSFT ce projet cible Team Foundation Server, pas Visual Studio Online. J'ai parcouru le code, et cela me semble être un bon point de départ pour lancer mon propre fournisseur. – wonea
Je ne trouve pas le fournisseur pour VSTS, mais vous pouvez créer un fournisseur par vous-même avec l'API TFS/VSTS. –