是否可以使用 TFS API 从当前 TFS 上下文中获取 @Project、@Me 等默认参数?
var contextManager = GetService<ITeamFoundationContextManager>(); // from Team Explorer (VS Extension)
var tpc = contextManager.CurrentContext.TeamProjectCollection;
var workItemStore = (WorkItemStore)tpc.GetService(typeof(WorkItemStore));
var project = workItemStore.Projects[teamProjectName];
var parameters = new Dictionary<string, string> { { "project", project.Name } }; // get them from context!?
var qry = project.QueryHierarchy.First(q => ...) as QueryDefinition;
var items = store.Query(qry, parameters);