public LoadTQLinking(string _filepath) { Init(_filepath); if (ccs == default(ControlConstructScheme)) { var client = Utility.GetClient(); var facet = new SearchFacet(); facet.ItemTypes.Add(DdiItemType.ControlConstructScheme); facet.SearchTargets.Add(DdiStringType.Name); facet.SearchTerms.Add("Topic Question Construct Groups"); facet.SearchLatestVersion = true; SearchResponse response = client.Search(facet); var graphPopulator = new GraphPopulator(client) { ChildProcessing = ChildReferenceProcessing.PopulateLatest }; graphPopulator.TypesToPopulate.Add(DdiItemType.ControlConstructGroup); if (response.Results.Count == 1) { ccs = client.GetItem( response.Results[0].CompositeId, ChildReferenceProcessing.PopulateLatest) as ControlConstructScheme; ccs.Accept(new GraphPopulator(client)); } } }
public static IEnumerable <IVersionable> FinishedAllBuilds(bool clear_vs_reference = true) { if (ccs == default(ControlConstructScheme)) { return(new List <IVersionable>()); } else { var gthr = new ItemGathererVisitor(); gthr.TypesToFind.Add(DdiItemType.ControlConstructScheme); gthr.TypesToFind.Add(DdiItemType.ControlConstructGroup); ccs.Accept(gthr); var foundItems = gthr.FoundItems; if (clear_vs_reference) { ccs = default(ControlConstructScheme); } return(foundItems); } }