Ejemplo n.º 1
0
 public IAsyncResult BeginSearchExclusiveIncentives(SearchExclusiveIncentivesRequest SearchExclusiveIncentivesRequest, AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("SearchExclusiveIncentives", new object[1]
       {
     (object) SearchExclusiveIncentivesRequest
       }, callback, asyncState);
 }
Ejemplo n.º 2
0
 public IList<incentiveItem> GetExclusiveIncentives(sessionType session, string region, incentiveTypeEnum? incentiveType, int? programId, int? adspaceId, int page, int items, out int total)
 {
     SearchExclusiveIncentivesRequest SearchExclusiveIncentivesRequest = new SearchExclusiveIncentivesRequest();
       DateTime utcNow = DateTime.UtcNow;
       SearchExclusiveIncentivesRequest.nonce = Signature.GetNonce();
       SearchExclusiveIncentivesRequest.connectId = session.connectId;
       SearchExclusiveIncentivesRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "searchexclusiveincentives", SearchExclusiveIncentivesRequest.nonce);
       SearchExclusiveIncentivesRequest.timestamp = Signature.GetZDateTime(utcNow);
       if (adspaceId.HasValue)
       {
     SearchExclusiveIncentivesRequest.adspaceId = adspaceId.Value;
     SearchExclusiveIncentivesRequest.adspaceIdSpecified = true;
       }
       if (programId.HasValue)
       {
     SearchExclusiveIncentivesRequest.programId = programId.Value;
     SearchExclusiveIncentivesRequest.programIdSpecified = true;
       }
       if (incentiveType.HasValue)
       {
     SearchExclusiveIncentivesRequest.incentiveType = incentiveType.Value;
     SearchExclusiveIncentivesRequest.incentiveTypeSpecified = true;
       }
       if (!string.IsNullOrEmpty(region))
     SearchExclusiveIncentivesRequest.region = region;
       SearchExclusiveIncentivesRequest.page = page;
       SearchExclusiveIncentivesRequest.pageSpecified = true;
       SearchExclusiveIncentivesRequest.items = items;
       SearchExclusiveIncentivesRequest.itemsSpecified = true;
       SearchExclusiveIncentivesResponse incentivesResponse = this.publisherService.SearchExclusiveIncentives(SearchExclusiveIncentivesRequest);
       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);
       }
 }