コード例 #1
0
        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);
        }
コード例 #2
0
        public void Assign(uint shortcutNr, QueryPath queryPath)
        {
            if ((shortcutNr < MaxShortcuts) && (queryPath != null))
            {
                shortcuts[shortcutNr] = queryPath;

                PersistShortcuts();
            }
        }
コード例 #3
0
        public void Assign(uint shortcutNr, QueryPath queryPath)
        {
            if ((shortcutNr < MaxShortcuts) && (queryPath != null))
            {
                shortcuts[shortcutNr] = queryPath;

                PersistShortcuts();
            }
        }
コード例 #4
0
        public void Assign(uint shortcutNr)
        {
            shortcutNr = shortcutNr & 0x0f;

            QueryPath queryPath = visualStudioAdapter.GetCurrentSelectedQueryPath();

            if (queryPath != null)
            {
                shortcutStore.Assign(shortcutNr, queryPath);
            }
        }
コード例 #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]);
             }
         }
     }
 }
コード例 #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]);
             }
         }
     }
 }
コード例 #7
0
        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;
        }