/// <summary> /// Gets the work item tracking HTTP client. /// </summary> /// <param name="mostLikelyConnectionInfo">The most likely connection information.</param> /// <returns></returns> protected virtual WorkItemTrackingHttpClient GetWorkItemTrackingHttpClient(MostLikelyProjectInfo mostLikelyConnectionInfo) { var collectionUrl = TfsKnownElements.BuildWorkingCollectionUrl(mostLikelyConnectionInfo.TeamProjectCollectionRef.Name); var connection = GetProjectCollectionConnection(collectionUrl); var witClient = connection.GetClient <WorkItemTrackingHttpClient>(); return(witClient); }
/// <summary> /// Gets the workitem fields. /// </summary> /// <param name="mostLikelyProjectInfo">The most likely project information.</param> /// <returns></returns> protected virtual async Task <List <WorkItemField> > GetWorkitemFields(MostLikelyProjectInfo mostLikelyProjectInfo) { var witClient = GetWorkItemTrackingHttpClient(mostLikelyProjectInfo); return(await witClient.GetFieldsAsync()); }