Beispiel #1
0
 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>());
     }
 }
Beispiel #3
0
 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>();
     }
     
 }
Beispiel #4
0
 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>();
     }
 }
Beispiel #5
0
 private static void SearchWithQueryTest()
 {
     var nv = new Search("*ython");
     var pkgResponse = pmc.ExecuteAndDeserializeWithContent<List<PackageHeader>>(nv);
     Console.WriteLine(pkgResponse.content);
 }