public static WorkItemCollection GetWorkItems(this WorkItemStore store, QueryPath queryPath)
        {
            QueryDefinition definition = GetQueryDefinition(store, queryPath);

            return GetWorkItems(store,
                new Query(store, definition.QueryText, new Hashtable {{"project", queryPath.ProjectName}}),
                null);
        }
Exemplo n.º 2
0
        public void Assign(uint shortcutNr, QueryPath queryPath)
        {
            if ((shortcutNr < MaxShortcuts) && (queryPath != null))
            {
                shortcuts[shortcutNr] = queryPath;

                PersistShortcuts();
            }
        }
Exemplo n.º 3
0
        public void Assign(uint shortcutNr, QueryPath queryPath)
        {
            if ((shortcutNr < MaxShortcuts) && (queryPath != null))
            {
                shortcuts[shortcutNr] = queryPath;

                PersistShortcuts();
            }
        }
        public void Assign(uint shortcutNr)
        {
            shortcutNr = shortcutNr & 0x0f;

            QueryPath queryPath = visualStudioAdapter.GetCurrentSelectedQueryPath();

            if (queryPath != null)
            {
                shortcutStore.Assign(shortcutNr, queryPath);
            }
        }
Exemplo n.º 5
0
 private void LoadShortcutsFromStorage()
 {
     if (options.TfsQueryShortcuts != null)
     {
         for (int i = 0; i < options.TfsQueryShortcuts.Length && i < MaxShortcuts; i++)
         {
             if (!string.IsNullOrWhiteSpace(options.TfsQueryShortcuts[i]))
             {
                 shortcuts[i] = new QueryPath(options.TfsQueryShortcuts[i]);
             }
         }
     }
 }
Exemplo n.º 6
0
 private void LoadShortcutsFromStorage()
 {
     if (options.TfsQueryShortcuts != null)
     {
         for (int i = 0; i < options.TfsQueryShortcuts.Length && i < MaxShortcuts; i++)
         {
             if (!string.IsNullOrWhiteSpace(options.TfsQueryShortcuts[i]))
             {
                 shortcuts[i] = new QueryPath(options.TfsQueryShortcuts[i]);
             }
         }
     }
 }
        public static QueryDefinition GetQueryDefinition(this WorkItemStore store, QueryPath queryPath)
        {
            var queryHierarchy = store.Projects[queryPath.ProjectName].QueryHierarchy;

            var foundQueryItem = queryPath.PathNames
                .Aggregate<string, QueryItem>(queryHierarchy,
                    (queryItem, name) =>
                    {
                        var queryFolder = queryItem as QueryFolder;

                        if (queryFolder != null && queryFolder.Contains(name))
                        {
                            return queryFolder[name];
                        }

                        return null;
                    }
                );

            return foundQueryItem as QueryDefinition;
        }