static partial void RealInstanceFactory(ref StoredQueryCollection real, string callerName) { var store = WorkItemStoreWrapper_UnitTests.GetRealInstance(); Project tfsProject = store.Projects["RestPlaypen"]; real = tfsProject.StoredQueries; }
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); }
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); }
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 = "");