コード例 #1
0
        static partial void RealInstanceFactory(ref StoredQueryCollection real, string callerName)
        {
            var     store      = WorkItemStoreWrapper_UnitTests.GetRealInstance();
            Project tfsProject = store.Projects["RestPlaypen"];

            real = tfsProject.StoredQueries;
        }
コード例 #2
0
        public WITQueryNodeViewModel(StoredQueryCollection collection, string displayName)
        {
            DisplayName = displayName;
            Type        = NodeType.Root;

            IEnumerable <StoredQuery> myQueries   = collection.Cast <StoredQuery>().Where(x => x.QueryScope == QueryScope.Private);
            IEnumerable <StoredQuery> teamQueries = collection.Cast <StoredQuery>().Where(x => x.QueryScope == QueryScope.Public);

            WITQueryNodeViewModel myQueriesNode   = new WITQueryNodeViewModel(myQueries, "My Queries");
            WITQueryNodeViewModel teamQueriesNode = new WITQueryNodeViewModel(teamQueries, "Team Queries");

            Children.Add(myQueriesNode);
            Children.Add(teamQueriesNode);
        }
コード例 #3
0
ファイル: IssuesBrowser.cs プロジェクト: whut/turtletfs
        private void PopulateComboBoxWithSavedQueries(ComboBox comboBox)
        {
            Project project = workItemStore.Projects[options.ProjectName];
            StoredQueryCollection storedQueries = project.StoredQueries;

            foreach (StoredQuery query in storedQueries)
            {
                comboBox.Items.Add(new TfsQuery(query));
            }
            if (comboBox.Items.Count > 0)
            {
                comboBox.SelectedIndex = 0;
            }
        }
        internal static StoredQueryCollectionWrapper GetInstance()
        {
            StoredQueryCollection real = default(StoredQueryCollection);

            RealInstanceFactory(ref real);
            var instance = (StoredQueryCollectionWrapper)StoredQueryCollectionWrapper.GetWrapper(real);

            InstanceFactory(ref instance);
            if (instance == null)
            {
                Assert.Inconclusive("Could not Create Test Instance");
            }
            return(instance);
        }
コード例 #5
0
        private void PopulateQueries()
        {
            this.cmbQueries.Items.Clear();
            this.cmbQueries.Items.Add(string.Empty);

            if (this.selectedProjects.Count == 1)
            {
                string teamProject            = this.selectedProjects[0];
                StoredQueryCollection queries = this.sortedProjects[teamProject];
                foreach (StoredQuery query in queries)
                {
                    this.cmbQueries.Items.Add(query.Name);
                }
            }

            this.cmbQueries.SelectedIndex = 0;
        }
 static partial void RealInstanceFactory(ref StoredQueryCollection real, [CallerMemberName] string callerName = "");