public IAsyncResult BeginSearchIncentives(SearchIncentivesRequest SearchIncentivesRequest, AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("SearchIncentives", new object[1]
       {
     (object) SearchIncentivesRequest
       }, callback, asyncState);
 }
Beispiel #2
0
 public IList<incentiveItem> SearchIncentives(sessionType session, string region, incentiveTypeEnum? incentiveType, int? programId, int? adspaceId, int page, int items, out int total)
 {
     SearchIncentivesRequest SearchIncentivesRequest = new SearchIncentivesRequest();
       SearchIncentivesRequest.connectId = session.connectId;
       if (adspaceId.HasValue)
       {
     SearchIncentivesRequest.adspaceId = adspaceId.Value;
     SearchIncentivesRequest.adspaceIdSpecified = true;
       }
       if (programId.HasValue)
       {
     SearchIncentivesRequest.programId = programId.Value;
     SearchIncentivesRequest.programIdSpecified = true;
       }
       if (incentiveType.HasValue)
       {
     SearchIncentivesRequest.incentiveType = incentiveType.Value;
     SearchIncentivesRequest.incentiveTypeSpecified = true;
       }
       if (!string.IsNullOrEmpty(region))
     SearchIncentivesRequest.region = region;
       SearchIncentivesRequest.page = page;
       SearchIncentivesRequest.pageSpecified = true;
       SearchIncentivesRequest.items = items;
       SearchIncentivesRequest.itemsSpecified = true;
       SearchIncentivesResponse incentivesResponse = this.publisherService.SearchIncentives(SearchIncentivesRequest);
       if (incentivesResponse == null)
       {
     total = 0;
     return (IList<incentiveItem>) null;
       }
       else if (incentivesResponse.incentiveItems == null)
       {
     total = 0;
     return (IList<incentiveItem>) null;
       }
       else
       {
     total = (int) incentivesResponse.total;
     return (IList<incentiveItem>) Enumerable.ToList<incentiveItem>((IEnumerable<incentiveItem>) incentivesResponse.incentiveItems);
       }
 }