I need to get a list of process templates in TFS in order to further create my own process templates. How to get this interface?
IProcessTemplate processTemplate; I always use the client to work items to get the service:
WorkItemStore _wistore = new WorkItemStore("http://server_name:8080/tfs/DefaultCollection"); IProcessTemplates _templates = _wistore.TeamProjectCollection.GetService<IProcessTemplates>(); foreach (TemplateHeader _tmpl in _templates.TemplateHeaders()) Console.WriteLine("Process template: ID - {0}; Name - {1}; State - {2}\n{3}", _tmpl.TemplateId, _tmpl.Name, _tmpl.State, _tmpl.Description); There is a list of service functions: https://loicbaumann.fr/en/2009/04/02/what-you-need-to-know-to-use-the-process-template-api/
Source: https://ru.stackoverflow.com/questions/968394/
All Articles