public IAsyncResult BeginSearchPrograms(SearchProgramsRequest SearchProgramsRequest, AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("SearchPrograms", new object[1]
       {
     (object) SearchProgramsRequest
       }, callback, asyncState);
 }
示例#2
0
 public List<programItem> SearchPrograms(sessionType session, string query, string region, bool hasProducts, int? categoryId, DateTime? startDate, partnerShipEnum? partnerShip, int page, int items, out int total)
 {
     List<programItem> list = new List<programItem>();
       SearchProgramsRequest SearchProgramsRequest = new SearchProgramsRequest();
       SearchProgramsRequest.connectId = session.connectId;
       SearchProgramsRequest.query = query;
       SearchProgramsRequest.region = region;
       if (startDate.HasValue)
       {
     SearchProgramsRequest.startDate = startDate.Value;
     SearchProgramsRequest.startDateSpecified = true;
       }
       if (partnerShip.HasValue)
       {
     SearchProgramsRequest.partnerShip = partnerShip.Value;
     SearchProgramsRequest.partnerShipSpecified = true;
       }
       if (hasProducts)
       {
     SearchProgramsRequest.hasProducts = hasProducts;
     SearchProgramsRequest.hasProductsSpecified = true;
       }
       if (categoryId.HasValue)
       {
     SearchProgramsRequest.categoryId = categoryId.Value;
     SearchProgramsRequest.categoryIdSpecified = true;
       }
       SearchProgramsRequest.page = page;
       SearchProgramsRequest.pageSpecified = true;
       SearchProgramsRequest.items = items;
       SearchProgramsRequest.itemsSpecified = true;
       SearchProgramsResponse programsResponse = this.publisherService.SearchPrograms(SearchProgramsRequest);
       if (programsResponse == null)
       {
     total = 0;
     return (List<programItem>) null;
       }
       else if (programsResponse.programItems == null)
       {
     total = 0;
     return (List<programItem>) null;
       }
       else
       {
     total = (int) programsResponse.total;
     return Enumerable.ToList<programItem>((IEnumerable<programItem>) programsResponse.programItems);
       }
 }