Пример #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>());
     }
 }
Пример #2
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>());
     }
 }
Пример #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>();
     }
     
 }
Пример #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>();
     }
 }
Пример #5
0
 private static void SearchWithQueryTest()
 {
     var nv = new Search("*ython");
     var pkgResponse = pmc.ExecuteAndDeserializeWithContent<List<PackageHeader>>(nv);
     Console.WriteLine(pkgResponse.content);
 }