public IEnumerable <PackageHeader> Search(string search, int maxNumSearchResults) { try { var nv = new Greg.Requests.Search(search); var pkgResponse = Client.ExecuteAndDeserializeWithContent <List <PackageHeader> >(nv); return (pkgResponse.content.GetRange(0, Math.Min(maxNumSearchResults, pkgResponse.content.Count()))); } catch { return(new List <PackageHeader>()); } }
public List <PackageManagerSearchElement> Search(string search, int maxNumSearchResults) { try { var nv = new Greg.Requests.Search(search); var pkgResponse = Client.ExecuteAndDeserializeWithContent <List <PackageHeader> >(nv); return (pkgResponse.content.GetRange(0, Math.Min(maxNumSearchResults, pkgResponse.content.Count())) .Select((header) => new PackageManagerSearchElement(header)) .ToList()); } catch { return(new List <PackageManagerSearchElement>()); } }
public List<PackageManagerSearchElement> Search(string search, int maxNumSearchResults) { try { var nv = new Greg.Requests.Search(search); var pkgResponse = Client.ExecuteAndDeserializeWithContent<List<PackageHeader>>(nv); return pkgResponse.content.GetRange(0, Math.Min(maxNumSearchResults, pkgResponse.content.Count())) .Select((header) => new PackageManagerSearchElement(header)) .ToList(); } catch { return new List<PackageManagerSearchElement>(); } }
public IEnumerable<PackageHeader> Search(string search, int maxNumSearchResults) { try { var nv = new Greg.Requests.Search(search); var pkgResponse = Client.ExecuteAndDeserializeWithContent<List<PackageHeader>>(nv); return pkgResponse.content.GetRange(0, Math.Min(maxNumSearchResults, pkgResponse.content.Count())); } catch { return new List<PackageHeader>(); } }
private static void SearchWithQueryTest() { var nv = new Search("*ython"); var pkgResponse = pmc.ExecuteAndDeserializeWithContent<List<PackageHeader>>(nv); Console.WriteLine(pkgResponse.content); }