Пример #1
0
 public IAsyncResult BeginGetLeads(GetLeadsRequest GetLeadsRequest, AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetLeads", new object[1]
       {
     (object) GetLeadsRequest
       }, callback, asyncState);
 }
Пример #2
0
 public IList<leadItem> GetLeads(sessionType session, DateTime date, dateTypeEnum dateType, int? adSpaceId, int? programId, reviewStateEnum? reviewState, int items, int page, out int total)
 {
     GetLeadsRequest GetLeadsRequest = new GetLeadsRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetLeadsRequest.nonce = Signature.GetNonce();
       GetLeadsRequest.connectId = session.connectId;
       GetLeadsRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getleads", GetLeadsRequest.nonce);
       GetLeadsRequest.timestamp = Signature.GetZDateTime(utcNow);
       if (adSpaceId.HasValue)
       {
     GetLeadsRequest.adspaceId = adSpaceId.Value;
     GetLeadsRequest.adspaceIdSpecified = true;
       }
       if (programId.HasValue)
       {
     GetLeadsRequest.programId = programId.Value;
     GetLeadsRequest.programIdSpecified = true;
       }
       if (reviewState.HasValue)
       {
     GetLeadsRequest.reviewState = reviewState.Value;
     GetLeadsRequest.reviewStateSpecified = true;
       }
       GetLeadsRequest.date = date;
       GetLeadsRequest.dateType = dateType;
       GetLeadsRequest.items = items;
       GetLeadsRequest.itemsSpecified = true;
       GetLeadsRequest.page = page;
       GetLeadsRequest.pageSpecified = true;
       GetLeadsResponse leads = this.publisherService.GetLeads(GetLeadsRequest);
       if (leads == null)
       {
     total = 0;
     return (IList<leadItem>) null;
       }
       else if (leads.leadItems == null)
       {
     total = 0;
     return (IList<leadItem>) null;
       }
       else
       {
     total = (int) leads.total;
     return (IList<leadItem>) Enumerable.ToList<leadItem>((IEnumerable<leadItem>) leads.leadItems);
       }
 }