title: TFS api get query parameters from context
body: <p>Is it possible to get the default parameters like @Project, @Me, ...  from the current TFS context with the TFS API?</p>
  
  <pre><code>var contextManager = GetService&lt;ITeamFoundationContextManager&gt;(); // 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&lt;string, string&gt; { { "project", project.Name } }; // get them from context!?
  var qry = project.QueryHierarchy.First(q =&gt; ...) as QueryDefinition;
  var items = store.Query(qry, parameters);
  </code></pre>