Example Title |
Copy Code
|
---|---|
private List SearchForTests(String SearchString) { try { ISearchableFactory testSearchFact; SearchOptions searchOpts; List tList; Test oneTest; TestFactory tfact; int i, limit; String tempStr = String.Empty; int propertyID = (int)SEARCH_OPTIONS.SEARCH_IN_STEPS; tfact = tdConnection.TestFactory; testSearchFact = (ISearchableFactory)tfact; searchOpts = testSearchFact.CreateSearchOptions(); searchOpts.set_Property(propertyID, true); tList = testSearchFact.Search(SearchString, searchOpts); limit = 30; if (tList.Count < limit) { limit = tList.Count; } for (i = 1; i <= limit; i++) { oneTest = tList[i]; tempStr = String.Format("{0} - {1}", oneTest.ID, oneTest.Name); Debug.Print(tempStr); } return tList; } catch (Exception) { return null; } } |